aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/threading/mutex.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2009-12-21 17:03:33 +0100
committerTobias Brunner <tobias@strongswan.org>2009-12-23 17:03:41 +0100
commitb2944d71ca15b796c021a6cf89a8c67e46e2444a (patch)
tree27cd90bcce02f88c3087805c9b5a959be2378db8 /src/libstrongswan/threading/mutex.c
parent01e606546ca647989cbc781412036e6ade32cb6f (diff)
downloadstrongswan-b2944d71ca15b796c021a6cf89a8c67e46e2444a.tar.bz2
strongswan-b2944d71ca15b796c021a6cf89a8c67e46e2444a.tar.xz
Use pthread_cond_timedwait_monotonic on Android.
Diffstat (limited to 'src/libstrongswan/threading/mutex.c')
-rw-r--r--src/libstrongswan/threading/mutex.c5
1 files changed, 5 insertions, 0 deletions
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.
*/