summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-03-15 02:58:23 +0100
committerLioncash <mathew1800@gmail.com>2019-03-16 04:02:14 +0100
commitdb47d7e4716effb1021be3ebdc90763c3a53cafc (patch)
treefcdcf3d28b281aa6576badb61632ceb106e7b66a /src/core/hle/kernel/thread.cpp
parentkernel/thread: Make bracing consistent within UpdatePriority() (diff)
downloadyuzu-db47d7e4716effb1021be3ebdc90763c3a53cafc.tar
yuzu-db47d7e4716effb1021be3ebdc90763c3a53cafc.tar.gz
yuzu-db47d7e4716effb1021be3ebdc90763c3a53cafc.tar.bz2
yuzu-db47d7e4716effb1021be3ebdc90763c3a53cafc.tar.lz
yuzu-db47d7e4716effb1021be3ebdc90763c3a53cafc.tar.xz
yuzu-db47d7e4716effb1021be3ebdc90763c3a53cafc.tar.zst
yuzu-db47d7e4716effb1021be3ebdc90763c3a53cafc.zip
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index c5cee12dd..202997d20 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -303,7 +303,9 @@ void Thread::RemoveMutexWaiter(SharedPtr<Thread> thread) {
}
void Thread::UpdatePriority() {
- // Find the highest priority among all the threads that are waiting for this thread's lock
+ // If any of the threads waiting on the mutex have a higher priority
+ // (taking into account priority inheritance), then this thread inherits
+ // that thread's priority.
u32 new_priority = nominal_priority;
if (!wait_mutex_threads.empty()) {
if (wait_mutex_threads.front()->current_priority < new_priority) {