diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-06-13 22:19:05 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-06-13 22:19:05 +0000 |
commit | 193a7be520502f24e995b71768dd89c37b3776eb (patch) | |
tree | 29a1d10e1e74220c9d0d463bbcb03aa7c1954583 /src/include | |
parent | 8fac1ec21fc54a050822258d8873b9a87a2bd2fe (diff) | |
download | skalibs-193a7be520502f24e995b71768dd89c37b3776eb.tar.xz |
Fix iter_func type; add tain_earliest
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/skalibs/functypes.h | 2 | ||||
-rw-r--r-- | src/include/skalibs/tai.h | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/include/skalibs/functypes.h b/src/include/skalibs/functypes.h index 958b16f..b015f53 100644 --- a/src/include/skalibs/functypes.h +++ b/src/include/skalibs/functypes.h @@ -19,7 +19,7 @@ typedef cmp_func *cmp_func_ref ; typedef void *dtok_func (uint32_t, void *) ; typedef dtok_func *dtok_func_ref ; -typedef int iter_func (char *, void *) ; +typedef int iter_func (void *, void *) ; typedef iter_func *iter_func_ref ; typedef void free_func (void *) ; diff --git a/src/include/skalibs/tai.h b/src/include/skalibs/tai.h index 8bf2386..0e38b8c 100644 --- a/src/include/skalibs/tai.h +++ b/src/include/skalibs/tai.h @@ -125,6 +125,12 @@ extern int tain_sub (tain *, tain const *, tain const *) ; extern int tain_less (tain const *, tain const *) gccattr_pure ; #define tain_future(deadline) tain_less(&STAMP, (deadline)) +extern void tain_earliest1 (tain *, tain const *) ; +extern void tain_earliestv (tain *, tain const *const *, unsigned int) ; +#define tain_array(...) ((tain const *const[]){__VA_ARGS__}) +#define tain_earliestn(t, n, ...) tain_earliestv(t, tain_array(__VA_ARGS__), (n)) +#define tain_earliest(t, ...) tain_earliestn(t, sizeof(tain_array(__VA_ARGS__))/sizeof(tain const *), __VA_ARGS__) + #define TAIN_PACK 12 extern void tain_pack (char *, tain const *) ; extern void tain_unpack (char const *, tain *) ; |