summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libthr/thread/thr_cancel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_cancel.c b/lib/libthr/thread/thr_cancel.c
index 5a3960e..bedfaa9 100644
--- a/lib/libthr/thread/thr_cancel.c
+++ b/lib/libthr/thread/thr_cancel.c
@@ -77,7 +77,7 @@ testcancel(struct pthread *curthread)
int newval;
newval = curthread->cancelflags;
- if (SHOULD_CANCEL(newval))
+ if (SHOULD_CANCEL(newval) && !THR_IN_CRITICAL(curthread))
pthread_exit(PTHREAD_CANCELED);
}
OpenPOWER on IntegriCloud