blob: b8c9b420a1a609b062cbfc51b58c517b55a2e262 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
/* ISC license. */
#include <errno.h>
#include <skalibs/kolbak.h>
int kolbak_queue_init (kolbak_queue *q, kolbak_closure *s, size_t len)
{
if (len < 2) return (errno = EINVAL, 0) ;
q->x = s ;
q->n = len ;
q->head = 0 ;
q->tail = 0 ;
return 1 ;
}
|