diff options
author | David Xu <davidxu@FreeBSD.org> | 2006-03-26 01:57:03 +0000 |
---|---|---|
committer | David Xu <davidxu@FreeBSD.org> | 2006-03-26 01:57:03 +0000 |
commit | d448272d3c11db37e8d259c1968c74283f4a2b38 (patch) | |
tree | 4567475d90cc45f846ba9e55d72f1a34ee7313af /lib | |
parent | e61dc6cac4001f1abfc48ee27e4e623c2c044fa8 (diff) | |
download | src-test2-d448272d3c11db37e8d259c1968c74283f4a2b38.tar.gz src-test2-d448272d3c11db37e8d259c1968c74283f4a2b38.zip |
Notes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libthr/thread/thr_sig.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c index 335fa09cf271..71f97a0826ca 100644 --- a/lib/libthr/thread/thr_sig.c +++ b/lib/libthr/thread/thr_sig.c @@ -57,8 +57,8 @@ void _thr_ast(struct pthread *curthread) { if (!THR_IN_CRITICAL(curthread)) { - if (__predict_false(curthread->cancelflags & - THR_CANCEL_AT_POINT)) + if (__predict_false( + SHOULD_ASYNC_CANCEL(curthread->cancelflags))) _pthread_testcancel(); if (__predict_false((curthread->flags & (THR_FLAGS_NEED_SUSPEND | THR_FLAGS_SUSPENDED)) @@ -71,7 +71,9 @@ void _thr_suspend_check(struct pthread *curthread) { umtx_t cycle; + int err; + err = errno; /* * Blocks SIGCANCEL which other threads must send. */ @@ -115,6 +117,7 @@ _thr_suspend_check(struct pthread *curthread) * have one nesting signal frame, this should be fine. */ _thr_signal_unblock(curthread); + errno = err; } void |