summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sigtimedwait.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-08-20 19:50:45 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-08-20 19:50:45 +0200
commit4dd9e35bfd35d3138bc44169baba098005bad51e (patch)
treea4939c43a9c3fe00eb27f023e14acc5e1fe8808c /sysdeps/unix/sysv/linux/sigtimedwait.c
parentbd42a4599d1b6f77bcfe1e4f67b7cbd9e1cb2dfd (diff)
parentf76453c31593957fec1a99b986bfa5506618b79c (diff)
Merge commit 'refs/top-bases/t/bigmem' into t/bigmem
Diffstat (limited to 'sysdeps/unix/sysv/linux/sigtimedwait.c')
-rw-r--r--sysdeps/unix/sysv/linux/sigtimedwait.c34
1 files changed, 6 insertions, 28 deletions
diff --git a/sysdeps/unix/sysv/linux/sigtimedwait.c b/sysdeps/unix/sysv/linux/sigtimedwait.c
index 5491b480ea..a2e5b4129b 100644
--- a/sysdeps/unix/sysv/linux/sigtimedwait.c
+++ b/sysdeps/unix/sysv/linux/sigtimedwait.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2014 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,14 +19,15 @@
#include <signal.h>
#include <string.h>
+#include <nptl/pthreadP.h>
#include <sysdep-cancel.h>
#include <sys/syscall.h>
#ifdef __NR_rt_sigtimedwait
-static int
-do_sigtimedwait (const sigset_t *set, siginfo_t *info,
- const struct timespec *timeout)
+int
+__sigtimedwait (const sigset_t *set, siginfo_t *info,
+ const struct timespec *timeout)
{
#ifdef SIGCANCEL
sigset_t tmpset;
@@ -50,8 +51,7 @@ do_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. */
- int result = INLINE_SYSCALL (rt_sigtimedwait, 4, set,
- info, timeout, _NSIG / 8);
+ int result = SYSCALL_CANCEL (rt_sigtimedwait, set, info, timeout, _NSIG / 8);
/* The kernel generates a SI_TKILL code in si_code in case tkill is
used. tkill is transparently used in raise(). Since having
@@ -62,28 +62,6 @@ do_sigtimedwait (const sigset_t *set, siginfo_t *info,
return result;
}
-
-
-/* Return any pending signal or wait for one for the given time. */
-int
-__sigtimedwait (set, info, timeout)
- const sigset_t *set;
- siginfo_t *info;
- const struct timespec *timeout;
-{
- if (SINGLE_THREAD_P)
- return do_sigtimedwait (set, info, timeout);
-
- int oldtype = LIBC_CANCEL_ASYNC ();
-
- /* XXX The size argument hopefully will have to be changed to the
- real size of the user-level sigset_t. */
- int result = do_sigtimedwait (set, info, timeout);
-
- LIBC_CANCEL_RESET (oldtype);
-
- return result;
-}
libc_hidden_def (__sigtimedwait)
weak_alias (__sigtimedwait, sigtimedwait)
#else