diff options
| author | Daniel Eischen <deischen@FreeBSD.org> | 2002-05-24 04:32:28 +0000 |
|---|---|---|
| committer | Daniel Eischen <deischen@FreeBSD.org> | 2002-05-24 04:32:28 +0000 |
| commit | 5eb8d1f0b06897d05898ed3ba684d8860f9bef97 (patch) | |
| tree | 15691e04d3960954bb9843fcfd9d5beaf2553f80 /lib/libpthread/thread/thr_cond.c | |
| parent | a119f259955f142a20d551d91b53716aecd57edb (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_cond.c')
| -rw-r--r-- | lib/libpthread/thread/thr_cond.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/lib/libpthread/thread/thr_cond.c b/lib/libpthread/thread/thr_cond.c index 7f3fe7acb2dd..cb45725531d0 100644 --- a/lib/libpthread/thread/thr_cond.c +++ b/lib/libpthread/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: */ |
