From 258c9ab88dc8a27801b68306e6b9b64b2c93fd5d Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Fri, 16 Oct 1998 22:21:21 +0000 Subject: [PATCH] had it right the first time --- lib/isc/pthreads/condition.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/isc/pthreads/condition.c b/lib/isc/pthreads/condition.c index 3f1c60a5ea..7682be6e51 100644 --- a/lib/isc/pthreads/condition.c +++ b/lib/isc/pthreads/condition.c @@ -6,14 +6,16 @@ boolean_t os_condition_waituntil(os_condition_t *c, os_mutex_t *m, os_time_t *t, boolean_t *timeout) { + int result; struct timespec ts; ts.tv_sec = t->seconds; ts.tv_nsec = t->nanoseconds; - if (pthread_cond_timedwait(c, m, &ts) == 0) { + result = pthread_cond_timedwait(c, m, &ts); + if (result == 0) { *timeout = FALSE; return (TRUE); - } else if (errno == ETIMEDOUT) { + } else if (result == ETIMEDOUT) { *timeout = TRUE; return (TRUE); }