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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_cancel.c b/lib/libthr/thread/thr_cancel.c
index 311cf1e..180607c 100644
--- a/lib/libthr/thread/thr_cancel.c
+++ b/lib/libthr/thread/thr_cancel.c
@@ -80,7 +80,8 @@ retry:
* Disconnect the thread from the joinee:
*/
if ((joined = pthread->join_status.thread) != NULL) {
- if (THR_TRYLOCK(&joined->lock) == EBUSY) {
+ THR_TRYLOCK(&joined->lock, ret);
+ if (ret == EBUSY) {
_thread_critical_exit(pthread);
goto retry;
}
OpenPOWER on IntegriCloud