summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-06-17 17:31:43 +0000
committerEric Andersen <andersen@codepoet.org>2002-06-17 17:31:43 +0000
commit9d48a682c3e962c995c8eec8ba51fe560c840841 (patch)
tree149b7f5317fed97b290612c0f8405a777dc0a6d2 /libc
parentd6b2a407783dbbd6c9680601da005de0bb0ff37d (diff)
Add support for sigtimedwait and sigwaitinfo
-Erik
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/common/syscalls.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/syscalls.c b/libc/sysdeps/linux/common/syscalls.c
index 72b938c10..5d826927e 100644
--- a/libc/sysdeps/linux/common/syscalls.c
+++ b/libc/sysdeps/linux/common/syscalls.c
@@ -1516,6 +1516,45 @@ int sigpending(sigset_t *set)
#endif
//#define __NR_rt_sigtimedwait 177
+#ifdef L___rt_sigtimedwait
+#ifdef __NR_rt_sigtimedwait
+#define __NR___rt_sigtimedwait __NR_rt_sigtimedwait
+#include <signal.h>
+#define __need_NULL
+#include <stddef.h>
+_syscall4(int, __rt_sigtimedwait, const sigset_t *, set, siginfo_t *, info,
+ const struct timespec *, timeout, size_t, setsize);
+
+int sigwaitinfo(const sigset_t *set, siginfo_t *info)
+{
+ return __rt_sigtimedwait (set, info, NULL, _NSIG/8);
+}
+
+int sigtimedwait (const sigset_t *set, siginfo_t *info, const struct timespec *timeout)
+{
+ return __rt_sigtimedwait (set, info, timeout, _NSIG/8);
+}
+#else
+int sigwaitinfo(const sigset_t *set, siginfo_t *info)
+{
+ if (set==NULL)
+ __set_errno (EINVAL);
+ else
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+int sigtimedwait (const sigset_t *set, siginfo_t *info, const struct timespec *timeout)
+{
+ if (set==NULL)
+ __set_errno (EINVAL);
+ else
+ __set_errno (ENOSYS);
+ return -1;
+}
+#endif
+#endif
+
//#define __NR_rt_sigqueueinfo 178
//#define __NR_rt_sigsuspend 179