Skip to content

Commit

Permalink
honor dont_fake_monotonic in experimental sem_clockwait() (addresses w…
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfcw committed May 16, 2022
1 parent 859751e commit b61fade
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libfaketime.c
Original file line number Diff line number Diff line change
Expand Up @@ -1831,6 +1831,12 @@ int sem_clockwait(sem_t *sem, clockid_t clockid, const struct timespec *abstime)
int result;
struct timespec real_abstime, *real_abstime_pt;

if ((!fake_monotonic_clock) && (clockid == CLOCK_MONOTONIC))
{
DONT_FAKE_TIME(result = (*real_sem_clockwait)(sem, clockid, abstime));
return result;
}

/* sanity check */
if (abstime == NULL)
{
Expand Down

0 comments on commit b61fade

Please sign in to comment.