diff options
Diffstat (limited to 'src/thread/pthread_cond_signal.c')
-rw-r--r-- | src/thread/pthread_cond_signal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/thread/pthread_cond_signal.c b/src/thread/pthread_cond_signal.c index a0211287..e8ed71cc 100644 --- a/src/thread/pthread_cond_signal.c +++ b/src/thread/pthread_cond_signal.c @@ -2,7 +2,8 @@ int pthread_cond_signal(pthread_cond_t *c) { - if (a_swap(&c->_c_block, 0)); + int w = c->_c_waiters; + if (a_swap(&c->_c_block, 0) || w) __wake(&c->_c_block, 1, 0); return 0; } |