diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/generic/pause.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/generic/pause.c | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/sysdeps/unix/sysv/linux/generic/pause.c b/sysdeps/unix/sysv/linux/generic/pause.c index 7966df2499..45d3a0eb21 100644 --- a/sysdeps/unix/sysv/linux/generic/pause.c +++ b/sysdeps/unix/sysv/linux/generic/pause.c @@ -23,41 +23,17 @@ /* Suspend the process until a signal arrives. This always returns -1 and sets errno to EINTR. */ -static int -__syscall_pause (void) +int +__libc_pause (void) { sigset_t set; int rc = - INLINE_SYSCALL (rt_sigprocmask, 4, SIG_BLOCK, NULL, &set, _NSIG / 8); + SYSCALL_CANCEL (rt_sigprocmask, SIG_BLOCK, NULL, &set, _NSIG / 8); if (rc == 0) - rc = INLINE_SYSCALL (rt_sigsuspend, 2, &set, _NSIG / 8); + rc = SYSCALL_CANCEL (rt_sigsuspend, &set, _NSIG / 8); return rc; } -int -__libc_pause (void) -{ - if (SINGLE_THREAD_P) - return __syscall_pause (); - - int oldtype = LIBC_CANCEL_ASYNC (); - - int result = __syscall_pause (); - - LIBC_CANCEL_RESET (oldtype); - - return result; -} weak_alias (__libc_pause, pause) - -#ifndef NO_CANCELLATION -# include <not-cancel.h> - -int -__pause_nocancel (void) -{ - return __syscall_pause (); -} -#endif |