misc/threads: fix cancellation during mwait
misc/threads: fix cancellation during mwait

Prior to this patch the while-loop in src/misc/threads.c:mwait would
keep on spinning until the deadline has been reached, no matter if
vlc_addr_timedwait woke up due to the thread being canceled.

This commit makes sure that we check whether or not the thread has
been canceled, through vlc_testcancel, when vlc_addr_timedwait returns
(in order to also take spurious wake-ups into account).

Signed-off-by: Rémi Denis-Courmont <f0699137713be92736351a0674e79536595e4a60@remlab.net>

xkfz007/vlc,xkfz007/vlc,xkfz007/vlc,xkfz007/vlc,xkfz007/vlc,xkfz007/vlc,xkfz007/vlc