summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_sem.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libthr/thread/thr_sem.c')
-rw-r--r--lib/libthr/thread/thr_sem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_sem.c b/lib/libthr/thread/thr_sem.c
index 6a0bfc1..ada158c 100644
--- a/lib/libthr/thread/thr_sem.c
+++ b/lib/libthr/thread/thr_sem.c
@@ -178,6 +178,8 @@ sem_cancel_handler(void *arg)
sem_t *sem = arg;
atomic_add_int(&(*sem)->nwaiters, -1);
+ if ((*sem)->nwaiters && (*sem)->count)
+ _thr_umtx_wake(&(*sem)->count, 1);
}
int
OpenPOWER on IntegriCloud