thread: rationalise vlc_atomic_timedwait()
commit939b46b64302a921d4654eae70568d08b7d33aab
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 17 Feb 2020 17:30:00 +0000 (17 19:30 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 20 Feb 2020 18:39:02 +0000 (20 20:39 +0200)
treeb70d294541406cf4b4334f35fe4bd10a69142170
parent0d0fd05b6e9daa2cceefe5becc4e94a4026ccac4
thread: rationalise vlc_atomic_timedwait()

This changes the function prototype and semantics to more closely match
the other VLC timed-wait functions:
 - Return 0 on success, or an error code on "error", i.e., time-out.
 - Take an absolute deadline rather than a relative delay in.

This fixes time drift due to preemption and simplifies the call sites.
include/vlc_threads.h
src/linux/thread.c
src/misc/threads.c
src/posix/wait.c
src/win32/thread.c