summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_cancel.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libthr/thread/thr_cancel.c')
-rw-r--r--lib/libthr/thread/thr_cancel.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libthr/thread/thr_cancel.c b/lib/libthr/thread/thr_cancel.c
index 6a6e9ec..8552e57 100644
--- a/lib/libthr/thread/thr_cancel.c
+++ b/lib/libthr/thread/thr_cancel.c
@@ -131,9 +131,7 @@ _pthread_testcancel(void)
{
struct pthread *curthread = _get_curthread();
- curthread->cancel_point = 1;
testcancel(curthread);
- curthread->cancel_point = 0;
}
void
@@ -159,7 +157,7 @@ _thr_cancel_enter2(struct pthread *curthread, int maycancel)
void
_thr_cancel_leave(struct pthread *curthread, int maycancel)
{
+ curthread->cancel_point = 0;
if (maycancel)
testcancel(curthread);
- curthread->cancel_point = 0;
}
OpenPOWER on IntegriCloud