threads_posix: Use monotonic clock for condition variables where possible
authorChris Dickens <christopher.a.dickens@gmail.com>
Thu, 27 Aug 2020 20:54:21 +0000 (13:54 -0700)
committerChris Dickens <christopher.a.dickens@gmail.com>
Sun, 13 Sep 2020 07:09:31 +0000 (00:09 -0700)
commitccba488d11e373078aba7b086e3824417b31f67e
treed8fd4624c9e8b67462ec948f0f0ebd7d0320e08b
parentc3e292c57a42d16b3451eb6265cae2f1f8123a48
threads_posix: Use monotonic clock for condition variables where possible

The pthread_condattr_setclock() function allows one to specify that the
condition variable use CLOCK_MONOTONIC as the base for timed waits. This
is desirable to avoid premature timeouts if the system time is adjusted
while a timed wait is occurring. Add a check for the availability of
this function and use it where possible.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
configure.ac
libusb/os/threads_posix.c
libusb/os/threads_posix.h
libusb/version_nano.h