https://bugs.winehq.org/show_bug.cgi?id=50292
--- Comment #5 from Rémi Bernon rbernon@codeweavers.com --- (In reply to Zebediah Figura from comment #4)
(In reply to Rémi Bernon from comment #3)
(In reply to Rémi Bernon from comment #2)
If FUTEX_WAIT_BITSET is available, I think you can use it to wait with an absolute timeout, which could save calls to NtQuerySystemTime.
Or maybe it's on purpose because of CLOCK_MONOTONIC NTP adjustments? In which case please just ignore my comment.
Probably, yes, we'd need a RAW flag.
Actually, calling NtQuerySystemTime also suffers from the same issue, as from what I can see, it uses CLOCK_MONOTONIC.
Note though that the timeout is always relative when called through kernel32, so it doesn't help us much anyway.
Yes sure, and we always need to convert it to absolute first, but then we could call futex_wait with the absolute timeout directly and drop the update_timeout thing, making the code simpler.