kolbak_call.c (326B)
1 /* ISC license. */ 2 3 #include <errno.h> 4 5 #include <skalibs/unixmessage.h> 6 #include <skalibs/kolbak.h> 7 8 int kolbak_call (unixmessage const *m, kolbak_queue *q) 9 { 10 if (q->head == q->tail) return (errno = EILSEQ, 0) ; 11 if (!(*q->x[q->head].f)(m, q->x[q->head].data)) return 0 ; 12 q->head = (q->head + 1) % q->n ; 13 return 1 ; 14 }