about summary refs log tree commit diff
path: root/src/signal/sigtimedwait.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/signal/sigtimedwait.c')
-rw-r--r--src/signal/sigtimedwait.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/signal/sigtimedwait.c b/src/signal/sigtimedwait.c
new file mode 100644
index 00000000..155185de
--- /dev/null
+++ b/src/signal/sigtimedwait.c
@@ -0,0 +1,12 @@
+#include <signal.h>
+#include "syscall.h"
+
+int sigtimedwait(const sigset_t *mask, siginfo_t *si, const struct timespec *timeout)
+{
+	long k_timeout[2];
+	if (timeout) {
+		k_timeout[0] = timeout->tv_sec;
+		k_timeout[1] = timeout->tv_nsec;
+	}
+	return syscall4(__NR_rt_sigtimedwait, (long)mask, (long)si, timeout ? (long)k_timeout : 0, SYSCALL_SIGSET_SIZE);
+}