From: Tom Tromey Date: Sun, 22 Aug 1999 02:37:04 +0000 (+0000) Subject: re GNATS libgcj/40 (wait(timeout) wrongly throws IllegalMonitorState exception) X-Git-Tag: prereleases/libstdc++-2.92~11101 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=33e8c77e615b1d6d6c6e4e6785cce3d65bd08ac0;p=thirdparty%2Fgcc.git 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 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index c41ff38fa941..a3a6f50d3f62 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +1999-08-21 Tom Tromey + + * posix-threads.cc (_Jv_CondWait): Treat a timeout as a normal + result. PR 40. + 1999-08-21 Alexandre Oliva * configure.in: Check for in_addr_t in netinet/in.h too. Check diff --git a/libjava/posix-threads.cc b/libjava/posix-threads.cc index 825b0206c190..791c43bc7bb1 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; }