musl/src/thread/pthread_cond_broadcast.c

10 lines
178 B
C
Raw Normal View History

2011-02-12 00:22:29 -05:00
#include "pthread_impl.h"
int pthread_cond_broadcast(pthread_cond_t *c)
{
int w = c->_c_waiters;
if (a_swap(&c->_c_block, 0) || w)
__wake(&c->_c_block, -1, 0);
2011-02-12 00:22:29 -05:00
return 0;
}