summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thr_cond.c
diff options
context:
space:
mode:
authorDaniel Eischen <deischen@FreeBSD.org>2003-07-23 02:11:07 +0000
committerDaniel Eischen <deischen@FreeBSD.org>2003-07-23 02:11:07 +0000
commitcc24e836059e12193a1dfb766c7ba78fcd905875 (patch)
tree2ba938226cb9f3c751737df74c5cdf8e63cf8eba /lib/libpthread/thread/thr_cond.c
parenta33f5caff3ff006549d1334173f4c798239368e5 (diff)
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_cond.c')
-rw-r--r--lib/libpthread/thread/thr_cond.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_cond.c b/lib/libpthread/thread/thr_cond.c
index 9703da6c5304..0d6d91405f91 100644
--- a/lib/libpthread/thread/thr_cond.c
+++ b/lib/libpthread/thread/thr_cond.c
@@ -584,6 +584,7 @@ _pthread_cond_signal(pthread_cond_t * cond)
{
struct pthread *curthread = _get_curthread();
struct pthread *pthread;
+ struct kse_mailbox *kmbx;
int rval = 0;
THR_ASSERT(curthread->locklevel == 0,
@@ -619,8 +620,10 @@ _pthread_cond_signal(pthread_cond_t * cond)
(pthread->active_priority >
curthread->active_priority))
curthread->critical_yield = 1;
- _thr_setrunnable_unlocked(pthread);
+ kmbx = _thr_setrunnable_unlocked(pthread);
THR_SCHED_UNLOCK(curthread, pthread);
+ if (kmbx != NULL)
+ kse_wakeup(kmbx);
}
/* Check for no more waiters: */
if (TAILQ_FIRST(&(*cond)->c_queue) == NULL)
@@ -649,6 +652,7 @@ _pthread_cond_broadcast(pthread_cond_t * cond)
{
struct pthread *curthread = _get_curthread();
struct pthread *pthread;
+ struct kse_mailbox *kmbx;
int rval = 0;
THR_ASSERT(curthread->locklevel == 0,
@@ -682,8 +686,10 @@ _pthread_cond_broadcast(pthread_cond_t * cond)
(pthread->active_priority >
curthread->active_priority))
curthread->critical_yield = 1;
- _thr_setrunnable_unlocked(pthread);
+ kmbx = _thr_setrunnable_unlocked(pthread);
THR_SCHED_UNLOCK(curthread, pthread);
+ if (kmbx != NULL)
+ kse_wakeup(kmbx);
}
/* There are no more waiting threads: */