summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2006-03-26 01:57:03 +0000
committerDavid Xu <davidxu@FreeBSD.org>2006-03-26 01:57:03 +0000
commitd448272d3c11db37e8d259c1968c74283f4a2b38 (patch)
tree4567475d90cc45f846ba9e55d72f1a34ee7313af /lib
parente61dc6cac4001f1abfc48ee27e4e623c2c044fa8 (diff)
downloadsrc-test2-d448272d3c11db37e8d259c1968c74283f4a2b38.tar.gz
src-test2-d448272d3c11db37e8d259c1968c74283f4a2b38.zip
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/libthr/thread/thr_sig.c7
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