summaryrefslogtreecommitdiffstats
path: root/lib/libpthread
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-06-28 09:40:57 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-06-28 09:40:57 +0000
commite7f0429dc8d4eb4bcdf3dd9ac4d20a3eb82a5931 (patch)
tree6303303f84f24cb420c450c0a88417249c6d7391 /lib/libpthread
parentcec78b1ad335596a8e70ad8c0d3b619749a57656 (diff)
downloadFreeBSD-src-e7f0429dc8d4eb4bcdf3dd9ac4d20a3eb82a5931.zip
FreeBSD-src-e7f0429dc8d4eb4bcdf3dd9ac4d20a3eb82a5931.tar.gz
After thread was interrupted by signal, it should relock mutex.
Reviewed by: deischen
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/thread/thr_cond.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_cond.c b/lib/libpthread/thread/thr_cond.c
index b352ba3..59db00f 100644
--- a/lib/libpthread/thread/thr_cond.c
+++ b/lib/libpthread/thread/thr_cond.c
@@ -539,8 +539,7 @@ _pthread_cond_timedwait(pthread_cond_t * cond, pthread_mutex_t * mutex,
/* The wait timedout. */
rval = ETIMEDOUT;
(void)_mutex_cv_lock(mutex);
- } else if ((interrupted == 0) ||
- (done != 0))
+ } else if (interrupted || done)
rval = _mutex_cv_lock(mutex);
}
}
OpenPOWER on IntegriCloud