From b2944d71ca15b796c021a6cf89a8c67e46e2444a Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 21 Dec 2009 17:03:33 +0100 Subject: Use pthread_cond_timedwait_monotonic on Android. --- src/libstrongswan/threading/mutex.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libstrongswan/threading/mutex.c') diff --git a/src/libstrongswan/threading/mutex.c b/src/libstrongswan/threading/mutex.c index 9c05ff044..a35695624 100644 --- a/src/libstrongswan/threading/mutex.c +++ b/src/libstrongswan/threading/mutex.c @@ -253,6 +253,11 @@ static void _wait(private_condvar_t *this, private_mutex_t *mutex) } } +/* use the monotonic clock based version of this function if available */ +#ifdef HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC +#define pthread_cond_timedwait pthread_cond_timedwait_monotonic +#endif + /** * Implementation of condvar_t.timed_wait_abs. */ -- cgit v1.2.3