summaryrefslogtreecommitdiffstats
path: root/lib/libkse
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2000-11-16 22:50:33 +0000
committerdeischen <deischen@FreeBSD.org>2000-11-16 22:50:33 +0000
commit282d572dc01fd60b8231fd60e70fbbc9e015d440 (patch)
tree14868a7ca1402153e8868dab69fa0197fd9b0d47 /lib/libkse
parent732fe3d14425e47aefee6a51b510b416c37039a7 (diff)
downloadFreeBSD-src-282d572dc01fd60b8231fd60e70fbbc9e015d440.zip
FreeBSD-src-282d572dc01fd60b8231fd60e70fbbc9e015d440.tar.gz
Fix a bug where a statically initialized condition variable
was not getting properly initialized in pthread_cond_signal() and pthread_cond_broadcast(). Reportedly, this can cause an application to die. MFC candidate Submitted by: ade
Diffstat (limited to 'lib/libkse')
-rw-r--r--lib/libkse/thread/thr_cond.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libkse/thread/thr_cond.c b/lib/libkse/thread/thr_cond.c
index 5ff0967..9b93c1a 100644
--- a/lib/libkse/thread/thr_cond.c
+++ b/lib/libkse/thread/thr_cond.c
@@ -512,7 +512,7 @@ pthread_cond_signal(pthread_cond_t * cond)
* If the condition variable is statically initialized, perform dynamic
* initialization.
*/
- else if (*cond != NULL || (rval = pthread_cond_init(cond, NULL) == 0)) {
+ else if (*cond != NULL || (rval = pthread_cond_init(cond, NULL)) == 0) {
/*
* Defer signals to protect the scheduling queues
* from access by the signal handler:
@@ -580,7 +580,7 @@ pthread_cond_broadcast(pthread_cond_t * cond)
* If the condition variable is statically initialized, perform dynamic
* initialization.
*/
- else if (*cond != NULL || (rval = pthread_cond_init(cond, NULL) == 0)) {
+ else if (*cond != NULL || (rval = pthread_cond_init(cond, NULL)) == 0) {
/*
* Defer signals to protect the scheduling queues
* from access by the signal handler:
OpenPOWER on IntegriCloud