summaryrefslogtreecommitdiff
path: root/src/libunixonacid/buffer_timed_fill.c
blob: 6ec3e3003faf514a37aa52950d98d4a1a0d771a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* ISC license. */

#include <skalibs/allreadwrite.h>
#include <skalibs/buffer.h>
#include <skalibs/functypes.h>
#include <skalibs/unix-timed.h>

static ssize_t get (buffer *b)
{
  return sanitize_read(buffer_fill(b)) ;
}

ssize_t buffer_timed_fill (buffer *b, tain const *deadline, tain *stamp)
{
  return timed_get(b, (init_func_ref)&buffer_getfd, (get_func_ref)&get, deadline, stamp) ;
}