From d945bca329f7a13741e1d3afcf9f0f73f6c70ce9 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 16 Jul 2017 15:56:05 +0000 Subject: Add ftrigr_updateb() --- src/include/s6/ftrigr.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/s6/ftrigr.h b/src/include/s6/ftrigr.h index 4afbc97..425a689 100644 --- a/src/include/s6/ftrigr.h +++ b/src/include/s6/ftrigr.h @@ -3,6 +3,7 @@ #ifndef FTRIGR_H #define FTRIGR_H +#include #include #include #include @@ -55,10 +56,11 @@ struct ftrigr_s { skaclient_t connection ; genalloc list ; /* array of uint16_t */ + size_t head ; gensetdyn data ; /* set of ftrigr1_t */ skaclient_buffer_t buffers ; } ; -#define FTRIGR_ZERO { .connection = SKACLIENT_ZERO, .list = GENALLOC_ZERO, .data = GENSETDYN_INIT(ftrigr1_t, 2, 0, 1) } +#define FTRIGR_ZERO { .connection = SKACLIENT_ZERO, .list = GENALLOC_ZERO, .head = 0, .data = GENSETDYN_INIT(ftrigr1_t, 2, 0, 1) } extern ftrigr_t const ftrigr_zero ; @@ -74,9 +76,11 @@ extern void ftrigr_end (ftrigr_t *) ; /* Instant primitives for async programming */ #define ftrigr_fd(a) skaclient_fd(&(a)->connection) +extern int ftrigr_updateb (ftrigr_t *) ; extern int ftrigr_update (ftrigr_t *) ; extern int ftrigr_check (ftrigr_t *, uint16_t, char *) ; extern int ftrigr_checksa (ftrigr_t *, uint16_t, stralloc *) ; +extern void ftrigr_ack (ftrigr_t *, size_t) ; /* Synchronous functions with timeouts */ -- cgit 1.4.1