util: Fixes futex_wait on win32

The timeout compute is invalid

Fixes: 095dfc6caa ("util: Move the implementation of futex_wake and futex_wait from futex.h to futex.c")

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28473>
This commit is contained in:
Yonggang Luo 2023-02-21 10:21:36 +08:00 committed by Marge Bot
parent 8a24610477
commit 54e3fde5ca

View File

@ -142,7 +142,7 @@ int futex_wait(uint32_t *addr, int32_t value, const struct timespec *timeout)
struct timespec tsnow;
timespec_get(&tsnow, TIME_UTC);
timeout_ms = (timeout->tv_sec - tsnow.tv_nsec) * 1000 +
timeout_ms = (timeout->tv_sec - tsnow.tv_sec) * 1000 +
(timeout->tv_nsec - tsnow.tv_nsec) / 1000000;
}