From e8f8484fa9721cd8d929e630dbcb584ad4ff091b Mon Sep 17 00:00:00 2001 From: rpj Date: Tue, 3 Jul 2001 06:01:01 +0000 Subject: Undo a minor code change in condvar.c and insert comments in instead. --- condvar.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'condvar.c') diff --git a/condvar.c b/condvar.c index 65d4e5f..57beefd 100644 --- a/condvar.c +++ b/condvar.c @@ -728,7 +728,11 @@ ptw32_cond_wait_cleanup(void * args) if (sem_post( &(cv->semBlockLock) ) != 0) { *resultPtr = errno; - (void) pthread_mutex_unlock( &(cv->mtxUnblockLock) ); + /* + * This is a fatal error for this CV, + * so we deliberately don't unlock + * cv->mtxUnblockLock before returning. + */ return; } nSignalsWasLeft = 0; @@ -744,14 +748,22 @@ ptw32_cond_wait_cleanup(void * args) if (sem_wait( &(cv->semBlockLock) ) != 0) { *resultPtr = errno; - (void) pthread_mutex_unlock( &(cv->mtxUnblockLock) ); + /* + * This is a fatal error for this CV, + * so we deliberately don't unlock + * cv->mtxUnblockLock before returning. + */ return; } cv->nWaitersBlocked -= cv->nWaitersGone; if (sem_post( &(cv->semBlockLock) ) != 0) { *resultPtr = errno; - (void) pthread_mutex_unlock( &(cv->mtxUnblockLock) ); + /* + * This is a fatal error for this CV, + * so we deliberately don't unlock + * cv->mtxUnblockLock before returning. + */ return; } cv->nWaitersGone = 0; -- cgit v1.2.3