mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-29 15:45:29 +03:00
Fix KThread Priority Inheritance CAS
The CAS condition for KThread PI was inverted which lead to entirely incorrect behavior for CAS conditions which while it might work in the vast majority of cases would lead to significantly inaccurate behavior.
This commit is contained in:
parent
45cb8388cc
commit
284ac53d88
@ -284,7 +284,7 @@ namespace skyline::kernel::type {
|
||||
ownerPriority = waitingOn->priority.load();
|
||||
if (ownerPriority <= currentPriority)
|
||||
return;
|
||||
} while (waitingOn->priority.compare_exchange_strong(ownerPriority, currentPriority));
|
||||
} while (!waitingOn->priority.compare_exchange_strong(ownerPriority, currentPriority));
|
||||
|
||||
if (ownerPriority != currentPriority) {
|
||||
std::scoped_lock waiterLock{waitingOn->waiterMutex};
|
||||
|
Loading…
Reference in New Issue
Block a user