summaryrefslogtreecommitdiffstats
path: root/lib/libkse/thread/thr_cond.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libkse/thread/thr_cond.c')
-rw-r--r--lib/libkse/thread/thr_cond.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/lib/libkse/thread/thr_cond.c b/lib/libkse/thread/thr_cond.c
index 7f3fe7a..cb45725 100644
--- a/lib/libkse/thread/thr_cond.c
+++ b/lib/libkse/thread/thr_cond.c
@@ -524,15 +524,9 @@ _pthread_cond_signal(pthread_cond_t * cond)
if ((pthread = cond_queue_deq(*cond)) != NULL) {
/*
- * Unless the thread is currently suspended,
- * allow it to run. If the thread is suspended,
- * make a note that the thread isn't in a wait
- * queue any more.
+ * Wake up the signaled thread:
*/
- if (pthread->state != PS_SUSPENDED)
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- else
- pthread->suspended = SUSP_NOWAIT;
+ PTHREAD_NEW_STATE(pthread, PS_RUNNING);
}
/* Check for no more waiters: */
@@ -596,15 +590,9 @@ _pthread_cond_broadcast(pthread_cond_t * cond)
*/
while ((pthread = cond_queue_deq(*cond)) != NULL) {
/*
- * Unless the thread is currently suspended,
- * allow it to run. If the thread is suspended,
- * make a note that the thread isn't in a wait
- * queue any more.
+ * Wake up the signaled thread:
*/
- if (pthread->state != PS_SUSPENDED)
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- else
- pthread->suspended = SUSP_NOWAIT;
+ PTHREAD_NEW_STATE(pthread, PS_RUNNING);
}
/* There are no more waiting threads: */
OpenPOWER on IntegriCloud