Commit 0895d2e6 authored by Nils Goroll's avatar Nils Goroll

dont panic on pthread_cond_timedwait being interrupted

As discussed with phk: Callers of Lck_CondWait with timeout should
be prepared for early wakeups.
parent ae63cc53
......@@ -198,7 +198,9 @@ Lck_CondWait(pthread_cond_t *cond, struct lock *lck, double when)
ts.tv_nsec = (long)(modf(when, &t) * 1e9);
ts.tv_sec = (long)t;
retval = pthread_cond_timedwait(cond, &ilck->mtx, &ts);
assert(retval == 0 || retval == ETIMEDOUT);
assert(retval == 0 ||
retval == ETIMEDOUT ||
retval == EINTR);
}
AZ(ilck->held);
ilck->held = 1;
......
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