mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-25 21:54:17 +01:00
Fix missed attempt increment in spinlock
Should hog CPU slightly less and correctly yield now
This commit is contained in:
parent
35a46acbb1
commit
4e5141f879
@ -18,6 +18,7 @@ namespace skyline {
|
||||
if (!locked.test_and_set(std::memory_order_acquire))
|
||||
return;
|
||||
|
||||
attempt++;
|
||||
if (attempt % LockAttemptsPerSleep == 0)
|
||||
std::this_thread::sleep_for(std::chrono::microseconds(100));
|
||||
else if (attempt % LockAttemptsPerYield == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user