summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libthr/thread/thr_syscalls.c')
-rw-r--r--lib/libthr/thread/thr_syscalls.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_syscalls.c b/lib/libthr/thread/thr_syscalls.c
index 712249b..362826c 100644
--- a/lib/libthr/thread/thr_syscalls.c
+++ b/lib/libthr/thread/thr_syscalls.c
@@ -227,6 +227,20 @@ __thr_fsync(int fd)
return (ret);
}
+static int
+__thr_fdatasync(int fd)
+{
+ struct pthread *curthread;
+ int ret;
+
+ curthread = _get_curthread();
+ _thr_cancel_enter2(curthread, 0);
+ ret = __sys_fdatasync(fd);
+ _thr_cancel_leave(curthread, 1);
+
+ return (ret);
+}
+
/*
* Cancellation behavior:
* Thread may be canceled after system call.
@@ -653,6 +667,7 @@ __thr_interpose_libc(void)
SLOT(wait6);
SLOT(ppoll);
SLOT(map_stacks_exec);
+ SLOT(fdatasync);
#undef SLOT
*(__libc_interposing_slot(
INTERPOS__pthread_mutex_init_calloc_cb)) =
OpenPOWER on IntegriCloud