summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/thread/pthread_cond_broadcast.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/thread/pthread_cond_broadcast.c')
-rw-r--r--libc-top-half/musl/src/thread/pthread_cond_broadcast.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/thread/pthread_cond_broadcast.c b/libc-top-half/musl/src/thread/pthread_cond_broadcast.c
new file mode 100644
index 0000000..6bfab78
--- /dev/null
+++ b/libc-top-half/musl/src/thread/pthread_cond_broadcast.c
@@ -0,0 +1,10 @@
+#include "pthread_impl.h"
+
+int pthread_cond_broadcast(pthread_cond_t *c)
+{
+ 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;
+}