diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-03-14 21:51:03 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-03-15 23:02:10 -0400 |
| commit | c92e8f4e3068baaf22728a4e85340880842baf4b (patch) | |
| tree | 5cd5d3335fbeb75e730ba82931cc5d7c11815f10 /src/core/hle/kernel/thread.cpp | |
| parent | f68087ce1251adce4860c4afb254d57aa38c22d1 (diff) | |
kernel/thread: Make bracing consistent within UpdatePriority()
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 4b68b555f8..c5cee12dd3 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -306,12 +306,14 @@ void Thread::UpdatePriority() { // Find the highest priority among all the threads that are waiting for this thread's lock u32 new_priority = nominal_priority; 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; + } } - if (new_priority == current_priority) + if (new_priority == current_priority) { return; + } scheduler->SetThreadPriority(this, new_priority); current_priority = new_priority; |
