mutex: Don't use ...timedwait_monotonic() if clock is set via attribute
This allows using clocks other than CLOCK_MONOTONIC.
This commit is contained in:
@@ -239,7 +239,8 @@ METHOD(condvar_t, wait_, void,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* use the monotonic clock based version of this function if available */
|
/* use the monotonic clock based version of this function if available */
|
||||||
#ifdef HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC
|
#if defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC) && \
|
||||||
|
!defined(HAVE_CONDATTR_CLOCK_MONOTONIC)
|
||||||
#define pthread_cond_timedwait pthread_cond_timedwait_monotonic
|
#define pthread_cond_timedwait pthread_cond_timedwait_monotonic
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user