_Cnd_timedwait timeout

Piotr Caban piotr.caban at gmail.com
Mon Dec 4 11:43:27 CST 2017


Hi Stefan,

On 12/04/17 17:33, Stefan Dösinger wrote:
> 1) Why go through _Xtime_diff_to_millis at all? If I understand the
> server code right NtWaitForKeyedEvent should do the right thing if we
> pass timeout.QuadPart = sec * 1000 * 1000 * 100 + nsec / 10. And indeed
> in my quick testing this works for the app and passes the tests. Are
> there timezone issues?
The timeout is specified in 100's of nanoseconds.

I wonder if native works well if time difference doesn't fit into ULONG, 
did you check that? If it doesn't - the simplest fix would be to do 
something like this:
timeout.QuadPart = (ULONGLONG)((ULONG)_Xtime_diff_to_millis(xt)) * -10000;
Otherwise you can change the code to not use _Xtime_diff_to_millis.

Thanks,
Piotr



More information about the wine-devel mailing list