1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-04 12:52:15 +00:00

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
This commit is contained in:
Daniel Eischen 2000-11-16 22:50:33 +00:00
parent d9374c913e
commit f17033e38d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=68844
3 changed files with 6 additions and 6 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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: