From aa3cee213a291e2fd7298579059706622dd16793 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 17 Jun 2003 20:46:06 +0000 Subject: 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. --- sysdeps/unix/sysv/linux/sigtimedwait.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sysdeps/unix/sysv/linux/sigtimedwait.c') diff --git a/sysdeps/unix/sysv/linux/sigtimedwait.c b/sysdeps/unix/sysv/linux/sigtimedwait.c index a22a1d2ea8..a016b71ec7 100644 --- a/sysdeps/unix/sysv/linux/sigtimedwait.c +++ b/sysdeps/unix/sysv/linux/sigtimedwait.c @@ -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), -- cgit v1.2.3