* posix-threads.cc (_Jv_CondWait): pthread_ calls return error
code and don't set errno.
From-SVN: r29179
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'.
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
}
}
}
- else if (r && errno == ETIMEDOUT)
+ else if (r == ETIMEDOUT)
{
/* A timeout is a normal result. */
r = 0;
while (! done_sleeping);
}
- return r;
+ return r != 0;
}
#ifndef RECURSIVE_MUTEX_IS_DEFAULT