about summary refs log tree commit diff
path: root/src/thread/pthread_cond_signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread/pthread_cond_signal.c')
-rw-r--r--src/thread/pthread_cond_signal.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/thread/pthread_cond_signal.c b/src/thread/pthread_cond_signal.c
index 5fd72f90..119c00ab 100644
--- a/src/thread/pthread_cond_signal.c
+++ b/src/thread/pthread_cond_signal.c
@@ -1,9 +1,12 @@
 #include "pthread_impl.h"
 
+int __private_cond_signal(pthread_cond_t *, int);
+
 int pthread_cond_signal(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);
-	if (c->_c_waiters) __wake(&c->_c_seq, 1, c->_c_mutex!=(void*)-1);
+	__wake(&c->_c_seq, 1, 0);
 	return 0;
 }