aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/pthread/pthread_sigmask.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-25 20:41:26 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-25 20:41:26 +0000
commit09402f5bc1d87787c84dbf75d41777c87b1ce40e (patch)
treed5be40f068434405ba1554389d73460fea0a1a0a /nptl/sysdeps/pthread/pthread_sigmask.c
parent2a9ae45c3f89b4069e75c53f6dd32e8174b5cfd1 (diff)
downloadglibc-09402f5bc1d87787c84dbf75d41777c87b1ce40e.tar
glibc-09402f5bc1d87787c84dbf75d41777c87b1ce40e.tar.gz
glibc-09402f5bc1d87787c84dbf75d41777c87b1ce40e.tar.bz2
glibc-09402f5bc1d87787c84dbf75d41777c87b1ce40e.zip
Update.
2003-03-25 Ulrich Drepper <drepper@redhat.com> * csu/tst-atomic.c: Adjust tests to what atomic_add_negative and atomic_add_zero were supposed to do. * include/atomic.h: Adjust atomic_add_negative and atomic_add_zero to x86 behavior. * sysdeps/generic/bits/typesizes.h (__TIMER_T_TYPE): Define as void*. This matches the new timer implementation. * sysdeps/unix/sysv/linux/bits/siginfo.h (struct siginfo): Adjust timer info for what the kernel provides these days. (struct sigevent): Add _tid field. Define SIGEV_THREAD_ID. * Versions.def (librt): Add GLIBC_2.3.3. * abilist/libpthread.abilist: Update for nptl.
Diffstat (limited to 'nptl/sysdeps/pthread/pthread_sigmask.c')
-rw-r--r--nptl/sysdeps/pthread/pthread_sigmask.c35
1 files changed, 29 insertions, 6 deletions
diff --git a/nptl/sysdeps/pthread/pthread_sigmask.c b/nptl/sysdeps/pthread/pthread_sigmask.c
index 4114e0be2f..df6ac64ddb 100644
--- a/nptl/sysdeps/pthread/pthread_sigmask.c
+++ b/nptl/sysdeps/pthread/pthread_sigmask.c
@@ -32,13 +32,36 @@ pthread_sigmask (how, newmask, oldmask)
sigset_t local_newmask;
/* The only thing we have to make sure here is that SIGCANCEL is not
- blocked. */
- if (newmask != NULL
- && __builtin_expect (__sigismember (newmask, SIGCANCEL), 0))
+ blocked and that SIGTIMER is not unblocked. */
+ if (newmask != NULL)
{
- local_newmask = *newmask;
- sigdelset (&local_newmask, SIGCANCEL);
- newmask = &local_newmask;
+ 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;
+ }
+ }
}
#ifdef INTERNAL_SYSCALL