summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/__rt_sigtimedwait.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common/__rt_sigtimedwait.c')
-rw-r--r--libc/sysdeps/linux/common/__rt_sigtimedwait.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/__rt_sigtimedwait.c b/libc/sysdeps/linux/common/__rt_sigtimedwait.c
index f4244148d..aff5299a1 100644
--- a/libc/sysdeps/linux/common/__rt_sigtimedwait.c
+++ b/libc/sysdeps/linux/common/__rt_sigtimedwait.c
@@ -9,7 +9,7 @@
#include <sys/syscall.h>
-#ifdef __NR_rt_sigtimedwait
+#if defined(__NR_rt_sigtimedwait) || (defined(__NR_rt_sigtimedwait_time64) && defined(__UCLIBC_USE_TIME64__))
# include <signal.h>
# include <cancel.h>
# ifdef __UCLIBC_HAS_THREADS_NATIVE__
@@ -21,6 +21,10 @@
# include <string.h>
# endif
+#if defined(__UCLIBC_USE_TIME64__)
+#include "internal/time64_helpers.h"
+#endif
+
int __NC(sigtimedwait)(const sigset_t *set, siginfo_t *info,
const struct timespec *timeout)
{
@@ -52,8 +56,13 @@ int __NC(sigtimedwait)(const sigset_t *set, siginfo_t *info,
/* XXX The size argument hopefully will have to be changed to the
real size of the user-level sigset_t. */
/* on uClibc we use the kernel sigset_t size */
+# if defined(__UCLIBC_USE_TIME64__) && defined(__NR_rt_sigtimedwait_time64)
+ result = INLINE_SYSCALL(rt_sigtimedwait_time64, 4, set, info,
+ TO_TS64_P(timeout), __SYSCALL_SIGSET_T_SIZE);
+# else
result = INLINE_SYSCALL(rt_sigtimedwait, 4, set, info,
timeout, __SYSCALL_SIGSET_T_SIZE);
+# endif
/* The kernel generates a SI_TKILL code in si_code in case tkill is
used. tkill is transparently used in raise(). Since having
@@ -65,9 +74,14 @@ int __NC(sigtimedwait)(const sigset_t *set, siginfo_t *info,
return result;
# else
/* on uClibc we use the kernel sigset_t size */
+# if defined(__UCLIBC_USE_TIME64__) && defined(__NR_rt_sigtimedwait_time64)
+ return INLINE_SYSCALL(rt_sigtimedwait_time64, 4, set, info,
+ TO_TS64_P(timeout), __SYSCALL_SIGSET_T_SIZE);
+# else
return INLINE_SYSCALL(rt_sigtimedwait, 4, set, info,
timeout, __SYSCALL_SIGSET_T_SIZE);
# endif
+# endif
}
CANCELLABLE_SYSCALL(int, sigtimedwait,
(const sigset_t *set, siginfo_t *info, const struct timespec *timeout),