remove incorrect ESRCH error from pthread_kill
[musl] / src / thread / pthread_cond_broadcast.c
1 #include "pthread_impl.h"
2
3 int __private_cond_signal(pthread_cond_t *, int);
4
5 int pthread_cond_broadcast(pthread_cond_t *c)
6 {
7         if (!c->_c_shared) return __private_cond_signal(c, -1);
8         if (!c->_c_waiters) return 0;
9         a_inc(&c->_c_seq);
10         __wake(&c->_c_seq, -1, 0);
11         return 0;
12 }