Commit 49334d85 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

This addition supposedly fixed #1853, but on the face of it, it looks

like the sign is wrong, we should never get EINVAL if the deadline is
in the future.

Fix the test to make sense, and hope for the best (or a M1 :-)

Spotted by: Rasmus Villemoes
parent 532dcd3f
......@@ -221,7 +221,7 @@ Lck_CondWait(pthread_cond_t *cond, struct lock *lck, vtim_real when)
assert(ts.tv_nsec >= 0 && ts.tv_nsec <= 999999999);
errno = pthread_cond_timedwait(cond, &ilck->mtx, &ts);
#if defined (__APPLE__)
if (errno == EINVAL && when > VTIM_real()) {
if (errno == EINVAL && when <= VTIM_real()) {
/*
* Most kernels treat this as honest error,
* recognizing that a thread has no way to
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment