From e7608d778994e0236b2fe66ec70bb0c5a0aa0282 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 21 Apr 2003 07:39:20 +0000 Subject: Update. 2003-04-21 Ulrich Drepper * sysdeps/unix/sysv/linux/sigprocmask.c: Prevent changing mask for SIGCANCEL. * sysdeps/unix/sysv/linux/alpha/bits/siginfo.h: Define SI_TKILL. * sysdeps/unix/sysv/linux/bits/siginfo.h: Define SI_TKILL. * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Define SI_TKILL. * sysdeps/unix/sysv/linux/s390/bits/siginfo.h: Define SI_TKILL. * sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Define SI_TKILL. first syscall parameter to const char*. --- nptl/sysdeps/pthread/pthread_sigmask.c | 35 ++++++---------------------------- nptl/sysdeps/pthread/sigaction.c | 2 +- nptl/sysdeps/pthread/sigprocmask.c | 20 +++++++++++++++++++ 3 files changed, 27 insertions(+), 30 deletions(-) create mode 100644 nptl/sysdeps/pthread/sigprocmask.c (limited to 'nptl/sysdeps/pthread') diff --git a/nptl/sysdeps/pthread/pthread_sigmask.c b/nptl/sysdeps/pthread/pthread_sigmask.c index df6ac64ddb..efe186ac2c 100644 --- a/nptl/sysdeps/pthread/pthread_sigmask.c +++ b/nptl/sysdeps/pthread/pthread_sigmask.c @@ -32,36 +32,13 @@ pthread_sigmask (how, newmask, oldmask) sigset_t local_newmask; /* The only thing we have to make sure here is that SIGCANCEL is not - blocked and that SIGTIMER is not unblocked. */ - if (newmask != NULL) + blocked. */ + if (newmask != NULL + && __builtin_expect (__sigismember (newmask, SIGCANCEL), 0)) { - if (__builtin_expect (__sigismember (newmask, SIGCANCEL), 0)) - { - local_newmask = *newmask; - __sigdelset (&local_newmask, SIGCANCEL); - newmask = &local_newmask; - } - - if (__builtin_expect (__sigismember (newmask, SIGTIMER), 0)) - { - if (how == SIG_UNBLOCK) - { - if (newmask != &local_newmask) - local_newmask = *newmask; - __sigdelset (&local_newmask, SIGTIMER); - newmask = &local_newmask; - } - } - else - { - if (how == SIG_SETMASK) - { - if (newmask != &local_newmask) - local_newmask = *newmask; - __sigaddset (&local_newmask, SIGTIMER); - newmask = &local_newmask; - } - } + local_newmask = *newmask; + __sigdelset (&local_newmask, SIGCANCEL); + newmask = &local_newmask; } #ifdef INTERNAL_SYSCALL diff --git a/nptl/sysdeps/pthread/sigaction.c b/nptl/sysdeps/pthread/sigaction.c index d69abf09ae..392cb65c90 100644 --- a/nptl/sysdeps/pthread/sigaction.c +++ b/nptl/sysdeps/pthread/sigaction.c @@ -36,7 +36,7 @@ __sigaction (sig, act, oact) const struct sigaction *act; struct sigaction *oact; { - if (sig == SIGCANCEL || sig == SIGTIMER) + if (sig == SIGCANCEL) { __set_errno (EINVAL); return -1; diff --git a/nptl/sysdeps/pthread/sigprocmask.c b/nptl/sysdeps/pthread/sigprocmask.c new file mode 100644 index 0000000000..855b433962 --- /dev/null +++ b/nptl/sysdeps/pthread/sigprocmask.c @@ -0,0 +1,20 @@ +/* Copyright (C) 1997,1998,1999,2000,2001,2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include -- cgit 1.4.1