diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-12-22 17:37:09 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-12-22 17:37:09 +0000 |
commit | d7242bda59ec2ec056508b39cb532b5e7318dd13 (patch) | |
tree | ffb04351e694d0f7935062127daf0d1b47ebf3d2 /src/include | |
parent | da7304bbbfb90ced7a00acf5dbca0319d89fcc3a (diff) | |
download | s6-d7242bda59ec2ec056508b39cb532b5e7318dd13.tar.xz |
Port ftrigr and s6lock to textclient
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/s6/ftrigr.h | 11 | ||||
-rw-r--r-- | src/include/s6/s6lock.h | 9 |
2 files changed, 9 insertions, 11 deletions
diff --git a/src/include/s6/ftrigr.h b/src/include/s6/ftrigr.h index 425a689..3efb206 100644 --- a/src/include/s6/ftrigr.h +++ b/src/include/s6/ftrigr.h @@ -10,13 +10,13 @@ #include <skalibs/stralloc.h> #include <skalibs/genalloc.h> #include <skalibs/gensetdyn.h> -#include <skalibs/skaclient.h> +#include <skalibs/textclient.h> #include <s6/config.h> /* Constants */ -#define FTRIGR_IPCPATH SKALIBS_SPROOT "/service/ftrigrd/s" +#define FTRIGR_IPCPATH SKALIBS_SPROOT "/run/service/ftrigrd/s" #define FTRIGRD_PROG S6_BINPREFIX "s6-ftrigrd" #define FTRIGR_BANNER1 "ftrigr v1.0 (b)\n" @@ -54,13 +54,12 @@ extern ftrigr1_t const ftrigr1_zero ; typedef struct ftrigr_s ftrigr, ftrigr_t, *ftrigr_ref, *ftrigr_t_ref ; struct ftrigr_s { - skaclient_t connection ; + textclient_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, .head = 0, .data = GENSETDYN_INIT(ftrigr1_t, 2, 0, 1) } +#define FTRIGR_ZERO { .connection = TEXTCLIENT_ZERO, .list = GENALLOC_ZERO, .head = 0, .data = GENSETDYN_INIT(ftrigr1_t, 2, 0, 1) } extern ftrigr_t const ftrigr_zero ; @@ -75,7 +74,7 @@ extern void ftrigr_end (ftrigr_t *) ; /* Instant primitives for async programming */ -#define ftrigr_fd(a) skaclient_fd(&(a)->connection) +#define ftrigr_fd(a) textclient_fd(&(a)->connection) extern int ftrigr_updateb (ftrigr_t *) ; extern int ftrigr_update (ftrigr_t *) ; extern int ftrigr_check (ftrigr_t *, uint16_t, char *) ; diff --git a/src/include/s6/s6lock.h b/src/include/s6/s6lock.h index 8ac0127..b1f69c4 100644 --- a/src/include/s6/s6lock.h +++ b/src/include/s6/s6lock.h @@ -7,7 +7,7 @@ #include <skalibs/tai.h> #include <skalibs/genalloc.h> #include <skalibs/gensetdyn.h> -#include <skalibs/skaclient.h> +#include <skalibs/textclient.h> #include <s6/config.h> @@ -27,12 +27,11 @@ typedef struct s6lock_s s6lock_t, *s6lock_t_ref ; struct s6lock_s { - skaclient_t connection ; + textclient_t connection ; genalloc list ; /* array of uint16_t */ gensetdyn data ; /* set of char */ - skaclient_buffer_t buffers ; } ; -#define S6LOCK_ZERO { .connection = SKACLIENT_ZERO, .list = GENALLOC_ZERO, .data = GENSETDYN_INIT(int, 2, 0, 1) } +#define S6LOCK_ZERO { .connection = TEXTCLIENT_ZERO, .list = GENALLOC_ZERO, .data = GENSETDYN_INIT(int, 2, 0, 1) } extern s6lock_t const s6lock_zero ; @@ -47,7 +46,7 @@ extern void s6lock_end (s6lock_t *) ; /* Asynchronous primitives */ -#define s6lock_fd(a) skaclient_fd(&(a)->connection) +#define s6lock_fd(a) textclient_fd(&(a)->connection) extern int s6lock_update (s6lock_t *) ; extern int s6lock_check (s6lock_t *, uint16_t) ; |