summaryrefslogtreecommitdiff
path: root/src/libunixonacid/buffer_timed_fill.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libunixonacid/buffer_timed_fill.c')
-rw-r--r--src/libunixonacid/buffer_timed_fill.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libunixonacid/buffer_timed_fill.c b/src/libunixonacid/buffer_timed_fill.c
new file mode 100644
index 0000000..c6f580f
--- /dev/null
+++ b/src/libunixonacid/buffer_timed_fill.c
@@ -0,0 +1,17 @@
+/* ISC license. */
+
+#include <skalibs/allreadwrite.h>
+#include <skalibs/buffer.h>
+#include <skalibs/functypes.h>
+#include <skalibs/tai.h>
+#include <skalibs/unix-timed.h>
+
+static int get (buffer *b)
+{
+ return sanitize_read(buffer_fill(b)) ;
+}
+
+int buffer_timed_fill (buffer *b, tain_t const *deadline, tain_t *stamp)
+{
+ return timed_get(b, (initfunc_t_ref)&buffer_getfd, (initfunc_t_ref)&get, deadline, stamp) ;
+}