projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drop use of pthread_once in mutexattr kernel support tests
[musl]
/
src
/
thread
/
pthread_cond_broadcast.c
diff --git
a/src/thread/pthread_cond_broadcast.c
b/src/thread/pthread_cond_broadcast.c
index
30f7f6d
..
6bfab78
100644
(file)
--- a/
src/thread/pthread_cond_broadcast.c
+++ b/
src/thread/pthread_cond_broadcast.c
@@
-2,7
+2,9
@@
int pthread_cond_broadcast(pthread_cond_t *c)
{
int pthread_cond_broadcast(pthread_cond_t *c)
{
- if (a_swap(&c->_c_block, 0))
- __wake(&c->_c_block, -1, 0);
+ if (!c->_c_shared) return __private_cond_signal(c, -1);
+ if (!c->_c_waiters) return 0;
+ a_inc(&c->_c_seq);
+ __wake(&c->_c_seq, -1, 0);
return 0;
}
return 0;
}