summaryrefslogtreecommitdiff
path: root/src/libunixonacid/unixmessage_timed_receive.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libunixonacid/unixmessage_timed_receive.c')
-rw-r--r--src/libunixonacid/unixmessage_timed_receive.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/libunixonacid/unixmessage_timed_receive.c b/src/libunixonacid/unixmessage_timed_receive.c
index 08aabb2..b22cfd5 100644
--- a/src/libunixonacid/unixmessage_timed_receive.c
+++ b/src/libunixonacid/unixmessage_timed_receive.c
@@ -1,29 +1,30 @@
/* ISC license. */
#include <sys/types.h>
+
#include <skalibs/functypes.h>
#include <skalibs/unix-timed.h>
#include <skalibs/unixmessage.h>
-typedef struct unixmessage_get_s unixmessage_get_t, *unixmessage_get_t_ref ;
-struct unixmessage_get_s
+typedef struct unixmessage_getter_s unixmessage_getter, *unixmessage_getter_ref ;
+struct unixmessage_getter_s
{
- unixmessage_receiver_t *b ;
- unixmessage_t *m ;
+ unixmessage_receiver *b ;
+ unixmessage *m ;
} ;
-static int getfd (unixmessage_get_t *g)
+static int getfd (unixmessage_getter *g)
{
return unixmessage_receiver_fd(g->b) ;
}
-static ssize_t get (unixmessage_get_t *g)
+static ssize_t get (unixmessage_getter *g)
{
return unixmessage_receive(g->b, g->m) ;
}
-int unixmessage_timed_receive (unixmessage_receiver_t *b, unixmessage_t *m, tain_t const *deadline, tain_t *stamp)
+int unixmessage_timed_receive (unixmessage_receiver *b, unixmessage *m, tain const *deadline, tain *stamp)
{
- unixmessage_get_t g = { .b = b, .m = m } ;
- return timed_get(&g, (initfunc_t_ref)&getfd, (getfunc_t_ref)&get, deadline, stamp) ;
+ unixmessage_getter g = { .b = b, .m = m } ;
+ return timed_get(&g, (init_func_ref)&getfd, (get_func_ref)&get, deadline, stamp) ;
}