mirror of
https://github.com/fluencelabs/musl
synced 2025-07-30 22:01:57 +00:00
condition variable signal/bcast need not wake unless there are waiters
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
int pthread_cond_broadcast(pthread_cond_t *c)
|
||||
{
|
||||
c->_c_block = 0;
|
||||
__wake(&c->_c_block, -1, 0);
|
||||
if (a_swap(&c->_c_block, 0))
|
||||
__wake(&c->_c_block, -1, 0);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user