aboutsummaryrefslogtreecommitdiff
path: root/nptl/libc-cancellation.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-12-20 06:34:59 +0000
committerUlrich Drepper <drepper@redhat.com>2003-12-20 06:34:59 +0000
commit4efdd8d355a378ab85278bef1c00c05c46ab49e4 (patch)
tree2711786af8a2b51279bfefbe3acb481bd45e2e6b /nptl/libc-cancellation.c
parent8a7455e70db36c00281a31f60e899d6b424e732b (diff)
downloadglibc-4efdd8d355a378ab85278bef1c00c05c46ab49e4.zip
glibc-4efdd8d355a378ab85278bef1c00c05c46ab49e4.tar.gz
glibc-4efdd8d355a378ab85278bef1c00c05c46ab49e4.tar.bz2
Update.
2003-12-19 Ulrich Drepper <drepper@redhat.com> * eintr.c (setup_eintr): Add new parameter. Pass to thread function. (eintr_source): If ARG != NULL, use pthread_kill. * tst-eintr1.c: Adjust for this change. * tst-eintr2.c: Likewise. * Makefile (tests): Add tst-eintr3 and tst-eintr4. * tst-eintr3.c: New file. * tst-eintr4.c: New file. 2003-12-19 Jakub Jelinek <jakub@redhat.com> * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel if CANCELSTATE_BITMASK is set. * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel): Likewise. * Makefile (tests): Add tst-cancel22 and tst-cancel23. (tests-reverse): Add tst-cancel23. * tst-cancel22.c: New test. * tst-cancel23.c: New test.
Diffstat (limited to 'nptl/libc-cancellation.c')
-rw-r--r--nptl/libc-cancellation.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nptl/libc-cancellation.c b/nptl/libc-cancellation.c
index a68ee71..c9237e0 100644
--- a/nptl/libc-cancellation.c
+++ b/nptl/libc-cancellation.c
@@ -42,8 +42,9 @@ __libc_enable_asynccancel (void)
if (__builtin_expect ((oldval & CANCELED_BITMASK) != 0, 0))
{
- /* If we are already exiting stop right here. */
- if ((oldval & EXITING_BITMASK) != 0)
+ /* If we are already exiting or if PTHREAD_CANCEL_DISABLED,
+ stop right here. */
+ if ((oldval & (EXITING_BITMASK | CANCELSTATE_BITMASK)) != 0)
break;
int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling,