summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_sig.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libthr/thread/thr_sig.c')
-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 335fa09..71f97a0 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
OpenPOWER on IntegriCloud