mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 21:01:37 +00:00
Special case Sleep(0) to yield on Linux.
This commit is contained in:
parent
aed9683975
commit
1376a73c55
1 changed files with 4 additions and 1 deletions
|
|
@ -524,7 +524,10 @@ uint32_t KeDelayExecutionThread(uint32_t WaitMode, bool Alertable, be<int64_t>*
|
|||
#ifdef _WIN32
|
||||
Sleep(timeout);
|
||||
#else
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(timeout));
|
||||
if (timeout == 0)
|
||||
std::this_thread::yield();
|
||||
else
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(timeout));
|
||||
#endif
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue