diff options
author | Roland McGrath <roland@gnu.org> | 2006-07-31 05:58:51 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2006-07-31 05:58:51 +0000 |
commit | b894c2ea7e9dbf9d777555a2e1a917f5abcbb550 (patch) | |
tree | 2329d7803837f09fe25bd3471fa38dc86568598c /sysdeps/unix/sysv/linux/sigsuspend.c | |
parent | b32e6700d0a114c0132bd94cc1b49332a364dc8c (diff) | |
download | glibc-b894c2ea7e9dbf9d777555a2e1a917f5abcbb550.tar.gz |
* sysdeps/unix/sysv/linux/ia64/sigsuspend.c: File removed.cvs/fedora-glibc-20060731T0706
* sysdeps/unix/sysv/linux/x86_64/sigsuspend.c: File removed.
* sysdeps/unix/sysv/linux/s390/s390-64/sigsuspend.c: File removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c: File removed.
* sysdeps/unix/sysv/linux/not-cancel.h (pause_not_cancel): New macro.
(nanosleep_not_cancel): New macro.
(sigsuspend_not_cancel): new macro.
* sysdeps/unix/sysv/linux/sigsuspend.c [__ASSUME_REALTIME_SIGNALS]
(do_sigsuspend): Define as inline.
(__sigsuspend): Always use do_sigsuspend.
[! NO_CANCELLATION] (__sigsuspend_nocancel): New function.
* include/signal.h: Declare __sigsuspend_nocancel.
* sysdeps/posix/pause.c
[! NO_CANCELLATION] (__pause_nocancel): New function.
* include/unistd.h (__pause_nocancel): Add attribute_hidden.
* include/time.h (__nanosleep_nocancel): Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sigsuspend.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/sigsuspend.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/sysdeps/unix/sysv/linux/sigsuspend.c b/sysdeps/unix/sysv/linux/sigsuspend.c index 7b9b60911b..adbdfddfdb 100644 --- a/sysdeps/unix/sysv/linux/sigsuspend.c +++ b/sysdeps/unix/sysv/linux/sigsuspend.c @@ -56,6 +56,12 @@ do_sigsuspend (const sigset_t *set) return INLINE_SYSCALL (sigsuspend, 3, 0, 0, set->__val[0]); } +#else +static inline int __attribute__ ((always_inline)) +do_sigsuspend (const sigset_t *set) +{ + return INLINE_SYSCALL (rt_sigsuspend, 2, CHECK_SIGSET (set), _NSIG / 8); +} #endif /* Change the set of blocked signals to SET, @@ -64,19 +70,6 @@ int __sigsuspend (set) const sigset_t *set; { -#if __ASSUME_REALTIME_SIGNALS - if (SINGLE_THREAD_P) - return INLINE_SYSCALL (rt_sigsuspend, 2, CHECK_SIGSET (set), _NSIG / 8); - - int oldtype = LIBC_CANCEL_ASYNC (); - - int result = INLINE_SYSCALL (rt_sigsuspend, 2, CHECK_SIGSET (set), - _NSIG / 8); - - LIBC_CANCEL_RESET (oldtype); - - return result; -#else if (SINGLE_THREAD_P) return do_sigsuspend (set); @@ -87,8 +80,16 @@ __sigsuspend (set) LIBC_CANCEL_RESET (oldtype); return result; -#endif } libc_hidden_def (__sigsuspend) weak_alias (__sigsuspend, sigsuspend) strong_alias (__sigsuspend, __libc_sigsuspend) + +#ifndef NO_CANCELLATION +int +__sigsuspend_nocancel (set) + const sigset_t *set; +{ + return do_sigsuspend (set); +} +#endif |