mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-09 23:09:59 +00:00
kernel/thread: Make bracing consistent within UpdatePriority()
This commit is contained in:
parent
39483b92b7
commit
e0d1f11968
1 changed files with 4 additions and 2 deletions
|
@ -306,12 +306,14 @@ void Thread::UpdatePriority() {
|
||||||
// Find the highest priority among all the threads that are waiting for this thread's lock
|
// Find the highest priority among all the threads that are waiting for this thread's lock
|
||||||
u32 new_priority = nominal_priority;
|
u32 new_priority = nominal_priority;
|
||||||
if (!wait_mutex_threads.empty()) {
|
if (!wait_mutex_threads.empty()) {
|
||||||
if (wait_mutex_threads.front()->current_priority < new_priority)
|
if (wait_mutex_threads.front()->current_priority < new_priority) {
|
||||||
new_priority = wait_mutex_threads.front()->current_priority;
|
new_priority = wait_mutex_threads.front()->current_priority;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (new_priority == current_priority)
|
if (new_priority == current_priority) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
scheduler->SetThreadPriority(this, new_priority);
|
scheduler->SetThreadPriority(this, new_priority);
|
||||||
current_priority = new_priority;
|
current_priority = new_priority;
|
||||||
|
|
Loading…
Reference in a new issue