summaryrefslogtreecommitdiff
path: root/libjava/posix-threads.cc
diff options
context:
space:
mode:
authorTom Tromey <tromey@cygnus.com>1999-09-08 02:31:33 +0000
committerTom Tromey <tromey@gcc.gnu.org>1999-09-08 02:31:33 +0000
commit472236af04ca7daa01b6b5b1a00dafaf91d31f1f (patch)
treef3529165ca1d2f9885a39e697a1880b4fd2fbef3 /libjava/posix-threads.cc
parent5430acc846acabe753e2c7d159aa27673a7daeb6 (diff)
downloadgcc-472236af04ca7daa01b6b5b1a00dafaf91d31f1f.tar.gz
posix-threads.cc (_Jv_CondWait): pthread_ calls return error code and don't set errno.
* posix-threads.cc (_Jv_CondWait): pthread_ calls return error code and don't set errno. From-SVN: r29179
Diffstat (limited to 'libjava/posix-threads.cc')
-rw-r--r--libjava/posix-threads.cc6
1 files changed, 3 insertions, 3 deletions
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