Skip to content

Commit

Permalink
lck: Mention why we expect EINTR for a cond wait
Browse files Browse the repository at this point in the history
  • Loading branch information
dridi committed Feb 15, 2024
1 parent 88d927a commit 43af86c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/varnishd/cache/cache_lck.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ Lck_CondWaitUntil(pthread_cond_t *cond, struct lock *lck, vtim_real when)
errno = pthread_cond_timedwait(cond, &ilck->mtx, &ts);
}
#endif
/* We should never observe EINTR, but we have in the past. For
* example when sanitizers are enabled.
*/
assert(errno == 0 ||
errno == ETIMEDOUT ||
errno == EINTR);
Expand Down

0 comments on commit 43af86c

Please sign in to comment.