From 532166a82e0a78a1e9add8f06eb5f6d8e71bc769 Mon Sep 17 00:00:00 2001 From: tromey Date: Wed, 8 Sep 1999 02:31:33 +0000 Subject: * posix-threads.cc (_Jv_CondWait): pthread_ calls return error code and don't set errno. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29179 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/posix-threads.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libjava/posix-threads.cc') diff --git a/libjava/posix-threads.cc b/libjava/posix-threads.cc index 50c626fccac..e2f3b1bab1a 100644 --- a/libjava/posix-threads.cc +++ b/libjava/posix-threads.cc @@ -104,7 +104,7 @@ _Jv_CondWait (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu, r = pthread_cond_timedwait (cv, pmu, &ts); - if (r && errno == EINTR) + if (r == EINTR) { /* We were interrupted by a signal. Either this is because we were interrupted intentionally (i.e. by @@ -127,7 +127,7 @@ _Jv_CondWait (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu, } } } - else if (r && errno == ETIMEDOUT) + else if (r == ETIMEDOUT) { /* A timeout is a normal result. */ r = 0; @@ -139,7 +139,7 @@ _Jv_CondWait (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu, while (! done_sleeping); } - return r; + return r != 0; } #ifndef RECURSIVE_MUTEX_IS_DEFAULT -- cgit v1.2.1