From 4a968d807d2ec611f443d704ae875911894c04e2 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 10 May 2020 13:44:06 +0200 Subject: A few things MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libaxl_create.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 libaxl_create.c (limited to 'libaxl_create.c') diff --git a/libaxl_create.c b/libaxl_create.c new file mode 100644 index 0000000..5c78c27 --- /dev/null +++ b/libaxl_create.c @@ -0,0 +1,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; +} -- cgit v1.2.3-70-g09d2