Don't use POSIX semaphores if a MONOTONIC clock is available
authorMartin Willi <martin@revosec.ch>
Mon, 20 Aug 2012 15:58:58 +0000 (17:58 +0200)
committerMartin Willi <martin@revosec.ch>
Mon, 20 Aug 2012 16:01:20 +0000 (18:01 +0200)
commit88a5abf5e202b4aedae85a7891b759fe15b6198a
tree6dccdd90447eecfc8d012dc635ec4f5d032c8f50
parent10bdc7a96848d230e9c2fd57d25585a2734862f6
Don't use POSIX semaphores if a MONOTONIC clock is available

POSIX semaphores use CLOCK_REALTIME, but our semaphore_t abstraction
expects CLOCK_MONOTONIC based times. Use the mutex/condvar based
fallback if time_monotonic() actuall returns monotonic times.
src/libstrongswan/threading/semaphore.c