summaryrefslogtreecommitdiff
path: root/src/libstddjb/iopause_stamp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/iopause_stamp.c')
-rw-r--r--src/libstddjb/iopause_stamp.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/libstddjb/iopause_stamp.c b/src/libstddjb/iopause_stamp.c
new file mode 100644
index 0000000..d9a7e31
--- /dev/null
+++ b/src/libstddjb/iopause_stamp.c
@@ -0,0 +1,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 ;
+}