summaryrefslogtreecommitdiff
path: root/src/libunixonacid/kolbak_queue_init.c
blob: 6d91232870d66d4456193b6d9374cdf011c0d5a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* ISC license. */

#include <errno.h>
#include <skalibs/kolbak.h>

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 ;
}