re GNATS libgcj/40 (wait(timeout) wrongly throws IllegalMonitorState exception)
authorTom Tromey <tromey@cygnus.com>
Sun, 22 Aug 1999 02:37:04 +0000 (02:37 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Sun, 22 Aug 1999 02:37:04 +0000 (02:37 +0000)
* posix-threads.cc (_Jv_CondWait): Treat a timeout as a normal
result.  PR 40.

From-SVN: r28799

libjava/ChangeLog
libjava/posix-threads.cc

index c41ff38fa941c1f5c367855fee20ef16998522dd..a3a6f50d3f62ad7c92c417b3663b3cd5bfae151a 100644 (file)
@@ -1,3 +1,8 @@
+1999-08-21  Tom Tromey  <tromey@cygnus.com>
+
+       * posix-threads.cc (_Jv_CondWait): Treat a timeout as a normal
+       result.  PR 40.
+
 1999-08-21  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * configure.in: Check for in_addr_t in netinet/in.h too.  Check
index 825b0206c1906f6ca51364a146c833965cf0c015..791c43bc7bb1ed6ddece9af7033533fdd6c9d059 100644 (file)
@@ -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;
 }