diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2017-11-01 11:49:05 -0200 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2017-11-06 17:37:57 -0200 |
commit | 8b0e795aaa445e9167aa07b282c5720b35342c07 (patch) | |
tree | 07b62733e97ec88239289dc89b208c83b2a51ceb /sysdeps/unix/sysv/linux/sigtimedwait.c | |
parent | a1a638dda91ed7739a066477908511e53840603b (diff) | |
download | glibc-8b0e795aaa445e9167aa07b282c5720b35342c07.tar.gz glibc-8b0e795aaa445e9167aa07b282c5720b35342c07.tar.xz glibc-8b0e795aaa445e9167aa07b282c5720b35342c07.zip |
Simplify Linux sig{timed}wait{info} implementations
This patch simplifies sig{timed}wait{info} by: - Assuming __NR_rt_sigtimedwait existence on all architectures due minimum kernel version requirement (it pre-dates Linux git inclusion for Linux 2.6.12). - Call __sigtimedwait on both sigwait and sigwaitinfo. - Now that sigwait is based on an internal sigtimedwait call and it is present of both libc.so and libpthread.so we need to add an external private definition of __sigtimedwait for libpthread.so call. Checked on x86_64-linux-gnu. * sysdeps/unix/sysv/linux/Versions (libc) [GLIBC_PRIVATE]: Add __sigtimedwait. * sysdeps/unix/sysv/linux/sigtimedwait.c: Simplify includes and assume __NR_rt_sigtimedwait. * sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Call __sigtimedwait and add LIBC_CANCEL_HANDLED for cancellation marking. * sysdeps/unix/sysv/linux/sigwaitinfo.c (__sigwaitinfo): Likewise. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Reviewed-by: Zack Weinberg <zackw@panix.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/sigtimedwait.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/sigtimedwait.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/sysdeps/unix/sysv/linux/sigtimedwait.c b/sysdeps/unix/sysv/linux/sigtimedwait.c index 42afbce22c..2d96dd409f 100644 --- a/sysdeps/unix/sysv/linux/sigtimedwait.c +++ b/sysdeps/unix/sysv/linux/sigtimedwait.c @@ -18,12 +18,7 @@ #include <errno.h> #include <signal.h> #include <string.h> - -#include <nptl/pthreadP.h> #include <sysdep-cancel.h> -#include <sys/syscall.h> - -#ifdef __NR_rt_sigtimedwait int __sigtimedwait (const sigset_t *set, siginfo_t *info, @@ -57,6 +52,3 @@ __sigtimedwait (const sigset_t *set, siginfo_t *info, } libc_hidden_def (__sigtimedwait) weak_alias (__sigtimedwait, sigtimedwait) -#else -# include <signal/sigtimedwait.c> -#endif |