summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sigwait.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-10-12 00:49:44 +0000
committerUlrich Drepper <drepper@redhat.com>2002-10-12 00:49:44 +0000
commitf44476711db142376aa30182b23384037905b910 (patch)
treeb05a10a55b6be1d314a2fdf64f8f25a4fb9b6912 /sysdeps/unix/sysv/linux/sigwait.c
parenteb9f749186994ede50658aeae4ddd6432f93b34e (diff)
downloadglibc-f44476711db142376aa30182b23384037905b910.tar.gz
Update.
* sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Use INTERNAL_SYSCALL is possible. * sysdeps/unix/sysv/linux/i386/sysdep.h (INTERNAL_SYSCALL_ERROR_P): New define. (INTERNAL_SYSCALL_ERRNO): Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sigwait.c')
-rw-r--r--sysdeps/unix/sysv/linux/sigwait.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/sigwait.c b/sysdeps/unix/sysv/linux/sigwait.c
index 6eb4cf9532..121e5e0557 100644
--- a/sysdeps/unix/sysv/linux/sigwait.c
+++ b/sysdeps/unix/sysv/linux/sigwait.c
@@ -40,9 +40,19 @@ __sigwait (set, sig)
/* XXX The size argument hopefully will have to be changed to the
real size of the user-level sigset_t. */
- /* XXX INLINE_SYSCALL_NOERROR candiate. */
- ret = INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
- NULL, NULL, _NSIG / 8);
+#ifdef INTERNAL_SYSCALL
+ ret = INTERNAL_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
+ NULL, NULL, _NSIG / 8);
+ if (! INTERNAL_SYSCALL_ERROR_P (ret))
+ {
+ *sig = ret;
+ ret = 0;
+ }
+ else
+ ret = INTERNAL_SYSCALL_ERRNO (ret);
+#else
+ ret = INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
+ NULL, NULL, _NSIG / 8);
if (ret != -1)
{
*sig = ret;
@@ -50,6 +60,7 @@ __sigwait (set, sig)
}
else
ret = errno;
+#endif
return ret;
}