diff options
author | Tom Tromey <tromey@cygnus.com> | 1999-08-22 02:37:04 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 1999-08-22 02:37:04 +0000 |
commit | 33e8c77e615b1d6d6c6e4e6785cce3d65bd08ac0 (patch) | |
tree | 82196c45beec3fc0468dccdde2c7ea72643f7ba5 /libjava/posix-threads.cc | |
parent | ccfe7e465097f236b588a3c4f0408378e7b794ba (diff) | |
download | gcc-33e8c77e615b1d6d6c6e4e6785cce3d65bd08ac0.zip gcc-33e8c77e615b1d6d6c6e4e6785cce3d65bd08ac0.tar.gz gcc-33e8c77e615b1d6d6c6e4e6785cce3d65bd08ac0.tar.bz2 |
re GNATS libgcj/40 (wait(timeout) wrongly throws IllegalMonitorState exception)
* posix-threads.cc (_Jv_CondWait): Treat a timeout as a normal
result. PR 40.
From-SVN: r28799
Diffstat (limited to 'libjava/posix-threads.cc')
-rw-r--r-- | libjava/posix-threads.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libjava/posix-threads.cc b/libjava/posix-threads.cc index 825b020..791c43b 100644 --- a/libjava/posix-threads.cc +++ b/libjava/posix-threads.cc @@ -91,6 +91,9 @@ _Jv_CondWait (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu, ts.tv_nsec = ((m % 1000) * 1000000) + nanos; r = pthread_cond_timedwait (cv, pmu, &ts); + /* A timeout is a normal result. */ + if (r && errno == ETIME) + r = 0; } return r; } |