diff options
author | davidxu <davidxu@FreeBSD.org> | 2008-03-05 07:04:55 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2008-03-05 07:04:55 +0000 |
commit | 1efa6566c19f19d5e12e9521053f6029549b67d1 (patch) | |
tree | 1d5c815f40611f1e2d81f90ccda4a4df679acb0e /lib/libthr/thread | |
parent | d6c532fa793acc86939e2f314b7e07253c4d2f66 (diff) | |
download | FreeBSD-src-1efa6566c19f19d5e12e9521053f6029549b67d1.zip FreeBSD-src-1efa6566c19f19d5e12e9521053f6029549b67d1.tar.gz |
Increase and decrease in_sigcancel_handler accordingly to avoid possible
error caused by nested SIGCANCEL stack, it is a bit complex.
Diffstat (limited to 'lib/libthr/thread')
-rw-r--r-- | lib/libthr/thread/thr_sig.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c index c8ebc24..5d89d7f 100644 --- a/lib/libthr/thread/thr_sig.c +++ b/lib/libthr/thread/thr_sig.c @@ -69,9 +69,9 @@ sigcancel_handler(int sig __unused, if (curthread->cancel_defer && curthread->cancel_pending) thr_wake(curthread->tid); - curthread->in_sigcancel_handler = 1; + curthread->in_sigcancel_handler++; _thr_ast(curthread); - curthread->in_sigcancel_handler = 0; + curthread->in_sigcancel_handler--; } void |