summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/mutex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/mutex.cpp')
-rw-r--r--src/core/hle/kernel/mutex.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp
index cef961289..30dade552 100644
--- a/src/core/hle/kernel/mutex.cpp
+++ b/src/core/hle/kernel/mutex.cpp
@@ -25,10 +25,11 @@ void ReleaseThreadMutexes(Thread* thread) {
25Mutex::Mutex() {} 25Mutex::Mutex() {}
26Mutex::~Mutex() {} 26Mutex::~Mutex() {}
27 27
28SharedPtr<Mutex> Mutex::Create(bool initial_locked, std::string name) { 28SharedPtr<Mutex> Mutex::Create(bool initial_locked, VAddr addr, std::string name) {
29 SharedPtr<Mutex> mutex(new Mutex); 29 SharedPtr<Mutex> mutex(new Mutex);
30 30
31 mutex->lock_count = 0; 31 mutex->lock_count = 0;
32 mutex->addr = addr;
32 mutex->name = std::move(name); 33 mutex->name = std::move(name);
33 mutex->holding_thread = nullptr; 34 mutex->holding_thread = nullptr;
34 35
@@ -90,7 +91,7 @@ void Mutex::UpdatePriority() {
90 if (!holding_thread) 91 if (!holding_thread)
91 return; 92 return;
92 93
93 s32 best_priority = THREADPRIO_LOWEST; 94 u32 best_priority = THREADPRIO_LOWEST;
94 for (auto& waiter : GetWaitingThreads()) { 95 for (auto& waiter : GetWaitingThreads()) {
95 if (waiter->current_priority < best_priority) 96 if (waiter->current_priority < best_priority)
96 best_priority = waiter->current_priority; 97 best_priority = waiter->current_priority;