projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix the use of uninitialized value in regcomp
[musl]
/
src
/
thread
/
pthread_cond_signal.c
diff --git
a/src/thread/pthread_cond_signal.c
b/src/thread/pthread_cond_signal.c
index
a021128
..
119c00a
100644
(file)
--- a/
src/thread/pthread_cond_signal.c
+++ b/
src/thread/pthread_cond_signal.c
@@
-1,8
+1,12
@@
#include "pthread_impl.h"
#include "pthread_impl.h"
+int __private_cond_signal(pthread_cond_t *, int);
+
int pthread_cond_signal(pthread_cond_t *c)
{
int pthread_cond_signal(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;
}