clock: Support different clocks in pthread_cond_wait
Fix pthread_cond_timedwait to set the absolute timer using a timepoint, instead of the old s64. Moreover, now that we have both a wall-clock and monotonic clock, we can support pthread_condattr_setclock, so this patch also adds this support. OpenJDK 8, for example, cannot run without this support (it assumes that if the OS supports CLOCK_MONOTONIC, it can also configure condition variables to use it). Unfortunately supporting pthread_condattr_setclock - the only condition- variable attribute that really exists - grows the pthread condition variable structure :( Fixes #168. Reviewed-by:Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
Please register or sign in to comment