diff options
author | davidxu <davidxu@FreeBSD.org> | 2006-03-25 07:03:13 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2006-03-25 07:03:13 +0000 |
commit | 2926ddf5d192cefbc52b565ff47e0d09689dff2c (patch) | |
tree | 5951d42ff621276a0fff42db924d4ff4ccc08a27 /lib/libthr | |
parent | 3175cb1853d6e5548b848a2fc7335ef47feb7306 (diff) | |
download | FreeBSD-src-2926ddf5d192cefbc52b565ff47e0d09689dff2c.zip FreeBSD-src-2926ddf5d192cefbc52b565ff47e0d09689dff2c.tar.gz |
Don't cancel thread if it is in critical region.
Diffstat (limited to 'lib/libthr')
-rw-r--r-- | lib/libthr/thread/thr_cancel.c | 2 |
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); } |