From 3534b428629be185e096be99e3bd5fdfe32d5544 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 18 Sep 2014 18:55:44 +0000 Subject: initial commit with rc for skalibs-2.0.0.0 --- src/libunixonacid/kolbak_queue_init.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/libunixonacid/kolbak_queue_init.c (limited to 'src/libunixonacid/kolbak_queue_init.c') diff --git a/src/libunixonacid/kolbak_queue_init.c b/src/libunixonacid/kolbak_queue_init.c new file mode 100644 index 0000000..6d91232 --- /dev/null +++ b/src/libunixonacid/kolbak_queue_init.c @@ -0,0 +1,14 @@ +/* ISC license. */ + +#include +#include + +int kolbak_queue_init (kolbak_queue_t *q, kolbak_closure_t *s, unsigned int len) +{ + if (len < 2) return (errno = EINVAL, 0) ; + q->x = s ; + q->n = len ; + q->head = 0 ; + q->tail = 0 ; + return 1 ; +} -- cgit v1.2.3