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.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp
index 32dc1ffae..8f6c944d1 100644
--- a/src/core/hle/kernel/mutex.cpp
+++ b/src/core/hle/kernel/mutex.cpp
@@ -9,7 +9,6 @@
9#include "common/assert.h" 9#include "common/assert.h"
10#include "common/logging/log.h" 10#include "common/logging/log.h"
11#include "core/core.h" 11#include "core/core.h"
12#include "core/core.h"
13#include "core/hle/kernel/errors.h" 12#include "core/hle/kernel/errors.h"
14#include "core/hle/kernel/handle_table.h" 13#include "core/hle/kernel/handle_table.h"
15#include "core/hle/kernel/kernel.h" 14#include "core/hle/kernel/kernel.h"
@@ -126,11 +125,11 @@ ResultCode Mutex::TryAcquire(VAddr address, Handle holding_thread_handle,
126 125
127std::pair<ResultCode, std::shared_ptr<Thread>> Mutex::Unlock(std::shared_ptr<Thread> owner, 126std::pair<ResultCode, std::shared_ptr<Thread>> Mutex::Unlock(std::shared_ptr<Thread> owner,
128 VAddr address) { 127 VAddr address) {
129 // The mutex address must be 4-byte aligned 128 // The mutex address must be 4-byte aligned
130 if ((address % sizeof(u32)) != 0) { 129 if ((address % sizeof(u32)) != 0) {
131 LOG_ERROR(Kernel, "Address is not 4-byte aligned! address={:016X}", address); 130 LOG_ERROR(Kernel, "Address is not 4-byte aligned! address={:016X}", address);
132 return {ERR_INVALID_ADDRESS, nullptr}; 131 return {ERR_INVALID_ADDRESS, nullptr};
133 } 132 }
134 133
135 auto [new_owner, num_waiters] = GetHighestPriorityMutexWaitingThread(owner, address); 134 auto [new_owner, num_waiters] = GetHighestPriorityMutexWaitingThread(owner, address);
136 if (new_owner == nullptr) { 135 if (new_owner == nullptr) {