summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2006-03-25 07:03:13 +0000
committerdavidxu <davidxu@FreeBSD.org>2006-03-25 07:03:13 +0000
commit2926ddf5d192cefbc52b565ff47e0d09689dff2c (patch)
tree5951d42ff621276a0fff42db924d4ff4ccc08a27 /lib
parent3175cb1853d6e5548b848a2fc7335ef47feb7306 (diff)
downloadFreeBSD-src-2926ddf5d192cefbc52b565ff47e0d09689dff2c.zip
FreeBSD-src-2926ddf5d192cefbc52b565ff47e0d09689dff2c.tar.gz
Don't cancel thread if it is in critical region.
Diffstat (limited to 'lib')
-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