aboutsummaryrefslogtreecommitdiff
path: root/nptl/pthread_cancel.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pthread_cancel.c')
-rw-r--r--nptl/pthread_cancel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nptl/pthread_cancel.c b/nptl/pthread_cancel.c
index f4f0836..de4659a 100644
--- a/nptl/pthread_cancel.c
+++ b/nptl/pthread_cancel.c
@@ -53,7 +53,7 @@ sigcancel_handler (int sig, siginfo_t *si, void *ctx)
/* Set the return value. */
THREAD_SETMEM (self, result, PTHREAD_CANCELED);
/* Make sure asynchronous cancellation is still enabled. */
- if ((ch & CANCELTYPE_BITMASK) != 0)
+ if (self->canceltype == PTHREAD_CANCEL_ASYNCHRONOUS)
__do_cancel ();
}
@@ -104,8 +104,8 @@ __pthread_cancel (pthread_t th)
#endif
THREAD_SETMEM (pd, result, PTHREAD_CANCELED);
- if ((oldch & CANCELSTATE_BITMASK) == 0
- && (oldch & CANCELTYPE_BITMASK) != 0)
+ if (pd->cancelstate == PTHREAD_CANCEL_ENABLE
+ && pd->canceltype == PTHREAD_CANCEL_ASYNCHRONOUS)
__do_cancel ();
return 0;
}