]> gcc.gnu.org Git - gcc.git/commitdiff
posix-threads.cc (_Jv_CondWait): pthread_ calls return error code and don't set errno.
authorTom Tromey <tromey@cygnus.com>
Wed, 8 Sep 1999 02:31:33 +0000 (02:31 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Wed, 8 Sep 1999 02:31:33 +0000 (02:31 +0000)
* posix-threads.cc (_Jv_CondWait): pthread_ calls return error
code and don't set errno.

From-SVN: r29179

libjava/ChangeLog
libjava/posix-threads.cc

index 401462028380470dc4658be736ac01c954f72d70..39b542a76449154e20dcc31033b44dbb6c5dd1e8 100644 (file)
@@ -1,5 +1,8 @@
 1999-09-07  Tom Tromey  <tromey@cygnus.com>
 
+       * posix-threads.cc (_Jv_CondWait): pthread_ calls return error
+       code and don't set errno.
+
        * posix-threads.cc (_Jv_CondWait): Check `errno' against EINTR,
        not `r'.  Changed `done_sleeping' to a `bool'.
 
index 50c626fccac924b31e373f8a1aa4791c5ba851ec..e2f3b1bab1a8dab1f3341b30860f38a7a1533f93 100644 (file)
@@ -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
This page took 0.067616 seconds and 5 git commands to generate.