mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Remove useless #ifdefs from Linux sig*.c syscalls
sigprocmask.c, sigtimedwait.c, sigwait.c and sigwaitinfo.c files from sysdeps/unix/sysv/linux include nptl-signals.h via nptl/pthreadP.h, and so SIGCANCEL and SIGSETXID become defined unconditionally. But later in the code, there are some checks weither symbols defined, which is useless. This patch removes useless checks. Checked on x86_64-linux-gnu. * sysdeps/unix/sysv/linux/sigprocmask.c: Remove useless #ifdefs. * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. * sysdeps/unix/sysv/linux/sigwait.c: Likewise. * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Signed-off-by: Yury Norov <ynorov@caviumnetworks.com> Reviewed-by: Andreas Schwab <schwab@suse.de> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
committed by
Adhemerval Zanella
parent
e8681faa01
commit
87bbc4cf1e
@ -29,25 +29,18 @@ int
|
||||
__sigtimedwait (const sigset_t *set, siginfo_t *info,
|
||||
const struct timespec *timeout)
|
||||
{
|
||||
#ifdef SIGCANCEL
|
||||
sigset_t tmpset;
|
||||
if (set != NULL
|
||||
&& (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
|
||||
# ifdef SIGSETXID
|
||||
|| __builtin_expect (__sigismember (set, SIGSETXID), 0)
|
||||
# endif
|
||||
))
|
||||
|| __builtin_expect (__sigismember (set, SIGSETXID), 0)))
|
||||
{
|
||||
/* Create a temporary mask without the bit for SIGCANCEL set. */
|
||||
// We are not copying more than we have to.
|
||||
memcpy (&tmpset, set, _NSIG / 8);
|
||||
__sigdelset (&tmpset, SIGCANCEL);
|
||||
# ifdef SIGSETXID
|
||||
__sigdelset (&tmpset, SIGSETXID);
|
||||
# endif
|
||||
set = &tmpset;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* XXX The size argument hopefully will have to be changed to the
|
||||
real size of the user-level sigset_t. */
|
||||
|
Reference in New Issue
Block a user