mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
Update.
* sysdeps/unix/sysv/linux/sigtimedwait.c: If SIGCANCEL is defined and part of the incoming set, create a temporary set without this signal. * sysdeps/unix/sysv/linux/sigwait.c: Likewise. * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. returning because seconds==0. Add __builtin_expect.
This commit is contained in:
@ -32,6 +32,18 @@ static int
|
||||
do_sigtimedwait (const sigset_t *set, siginfo_t *info,
|
||||
const struct timespec *timeout)
|
||||
{
|
||||
#ifdef SIGCANCEL
|
||||
sigset_t tmpset;
|
||||
if (set != NULL && __sigismember (set, SIGCANCEL))
|
||||
{
|
||||
/* 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);
|
||||
set = &tmpset;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* 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, CHECK_SIGSET (set),
|
||||
|
Reference in New Issue
Block a user