skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

buffer_timed_fill.c (391B)


      1 /* ISC license. */
      2 
      3 #include <skalibs/allreadwrite.h>
      4 #include <skalibs/buffer.h>
      5 #include <skalibs/functypes.h>
      6 #include <skalibs/unix-timed.h>
      7 
      8 static ssize_t get (buffer *b)
      9 {
     10   return sanitize_read(buffer_fill(b)) ;
     11 }
     12 
     13 ssize_t buffer_timed_fill (buffer *b, tain const *deadline, tain *stamp)
     14 {
     15   return timed_get(b, (init_func_ref)&buffer_getfd, (get_func_ref)&get, deadline, stamp) ;
     16 }