From a56b526b51e914143185b26ce10e48e83e1d1e06 Mon Sep 17 00:00:00 2001 From: David Xu Date: Sat, 28 Jun 2003 09:40:57 +0000 Subject: After thread was interrupted by signal, it should relock mutex. Reviewed by: deischen --- lib/libpthread/thread/thr_cond.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/libpthread/thread/thr_cond.c') diff --git a/lib/libpthread/thread/thr_cond.c b/lib/libpthread/thread/thr_cond.c index b352ba3be3c9..59db00fc8dae 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); } } -- cgit v1.2.3