diff --git a/lib/libthr/thread/thr_cancel.c b/lib/libthr/thread/thr_cancel.c index 4194fe180565..7e78fe9163c7 100644 --- a/lib/libthr/thread/thr_cancel.c +++ b/lib/libthr/thread/thr_cancel.c @@ -71,7 +71,7 @@ _thr_cancel(pthread_t pthread) * _thr_find_thread and THR_THREAD_UNLOCK will enter and leave critical * region automatically. */ - if ((ret = _thr_find_thread(curthread, pthread, 0)) == 0) { + if ((ret = _thr_find_thread(curthread, pthread, 1)) == 0) { if (!pthread->cancel_pending) { pthread->cancel_pending = 1; if (pthread->state != PS_DEAD)