summary refs log tree commit diff
path: root/src/libstddjb/iopause_stamp.c
blob: d9a7e31eb2428e905001413d6003879e77169071 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* ISC license. */

#include <errno.h>
#include <skalibs/tai.h>
#include <skalibs/iopause.h>

extern int iopause_stamp (iopause_fd *x, unsigned int n, tain_t const *deadline, tain_t *stamp)
{
  register int r ;
  do
  {
    r = iopause(x, n, deadline, stamp) ;
    if (stamp)
    {
      int e = errno ;
      tain_now(stamp) ;
      errno = e ;
    }
  }
  while ((r < 0) && (errno == EINTR)) ;
  return r ;
}