aboutsummaryrefslogblamecommitdiffstats
path: root/libaxl_create.c
blob: 5c78c273b8f073204c3d8632f84d6ab24801c3f7 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                         
/* See LICENSE file for copyright and license details. */
#include "common.h"

LIBAXL_CONNECTION *
libaxl_create(int fd)
{
	LIBAXL_CONNECTION *conn;
	conn = calloc(1, sizeof(*conn));
	if (conn) {
		conn->fd = fd;
		atomic_init(&conn->xid_last, 0);
		INIT_LIBAXL_CONNECTION_RWLOCK(conn);
	}
	return conn;
}