Commit e86b4015 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

ntdll: Call usleep() instead of NtYieldExecution() in NtDelayExecution().

This implements the general fix from b1a79c6b (in particular, making sure that Sleep(0) will not immediately resume execution of the thread if there are no other runnable threads) while preserving the existing behavior of NtYieldExecution() / SwitchToThread(). Thanks Rémi for the idea. Signed-off-by: 's avatarMatteo Bruni <mbruni@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 3203f056
......@@ -1480,7 +1480,7 @@ NTSTATUS WINAPI NtDelayExecution( BOOLEAN alertable, const LARGE_INTEGER *timeou
}
/* Note that we yield after establishing the desired timeout */
NtYieldExecution();
usleep(0);
if (!when) return STATUS_SUCCESS;
for (;;)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment