6002c53507be55152328caacd3394614daa0dffd
[musl] / src / thread / pthread_cond_broadcast.c
1 #include "pthread_impl.h"
2
3 int pthread_cond_broadcast(pthread_cond_t *c)
4 {
5         int w = c->_c_waiters;
6         if (a_swap(&c->_c_block, 0) || w)
7                 __wake(&c->_c_block, -1, 0);
8         return 0;
9 }