summaryrefslogtreecommitdiffstats
path: root/lib/libkse/thread/thr_sem.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libkse/thread/thr_sem.c')
-rw-r--r--lib/libkse/thread/thr_sem.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/libkse/thread/thr_sem.c b/lib/libkse/thread/thr_sem.c
index 9ed6922..851eca2 100644
--- a/lib/libkse/thread/thr_sem.c
+++ b/lib/libkse/thread/thr_sem.c
@@ -226,15 +226,8 @@ _sem_post(sem_t *sem)
pthread_mutex_lock(&(*sem)->lock);
(*sem)->count++;
- if ((*sem)->nwaiters > 0) {
- /*
- * We must use pthread_cond_broadcast() rather than
- * pthread_cond_signal() in order to assure that the highest
- * priority thread is run by the scheduler, since
- * pthread_cond_signal() signals waiting threads in FIFO order.
- */
- pthread_cond_broadcast(&(*sem)->gtzero);
- }
+ if ((*sem)->nwaiters > 0)
+ pthread_cond_signal(&(*sem)->gtzero);
pthread_mutex_unlock(&(*sem)->lock);
OpenPOWER on IntegriCloud