aboutsummaryrefslogtreecommitdiffstats
path: root/libaxl_create.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libaxl_create.c15
1 files changed, 15 insertions, 0 deletions
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;
+}