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,6 +524,9 @@ uint32_t KeDelayExecutionThread(uint32_t WaitMode, bool Alertable, be<int64_t>*
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
Sleep(timeout);
|
Sleep(timeout);
|
||||||
#else
|
#else
|
||||||
|
if (timeout == 0)
|
||||||
|
std::this_thread::yield();
|
||||||
|
else
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(timeout));
|
std::this_thread::sleep_for(std::chrono::milliseconds(timeout));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue