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, 5 insertions, 0 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp
index eff4e45b0..7869eb32b 100644
--- a/src/core/hle/kernel/mutex.cpp
+++ b/src/core/hle/kernel/mutex.cpp
@@ -7,6 +7,7 @@
7#include <vector> 7#include <vector>
8 8
9#include "common/assert.h" 9#include "common/assert.h"
10#include "common/logging/log.h"
10#include "core/core.h" 11#include "core/core.h"
11#include "core/hle/kernel/errors.h" 12#include "core/hle/kernel/errors.h"
12#include "core/hle/kernel/handle_table.h" 13#include "core/hle/kernel/handle_table.h"
@@ -67,6 +68,7 @@ ResultCode Mutex::TryAcquire(VAddr address, Handle holding_thread_handle,
67 Handle requesting_thread_handle) { 68 Handle requesting_thread_handle) {
68 // The mutex address must be 4-byte aligned 69 // The mutex address must be 4-byte aligned
69 if ((address % sizeof(u32)) != 0) { 70 if ((address % sizeof(u32)) != 0) {
71 LOG_ERROR(Kernel, "Address is not 4-byte aligned! address={:016X}", address);
70 return ERR_INVALID_ADDRESS; 72 return ERR_INVALID_ADDRESS;
71 } 73 }
72 74
@@ -88,6 +90,8 @@ ResultCode Mutex::TryAcquire(VAddr address, Handle holding_thread_handle,
88 } 90 }
89 91
90 if (holding_thread == nullptr) { 92 if (holding_thread == nullptr) {
93 LOG_ERROR(Kernel, "Holding thread does not exist! thread_handle={:08X}",
94 holding_thread_handle);
91 return ERR_INVALID_HANDLE; 95 return ERR_INVALID_HANDLE;
92 } 96 }
93 97
@@ -109,6 +113,7 @@ ResultCode Mutex::TryAcquire(VAddr address, Handle holding_thread_handle,
109ResultCode Mutex::Release(VAddr address) { 113ResultCode Mutex::Release(VAddr address) {
110 // The mutex address must be 4-byte aligned 114 // The mutex address must be 4-byte aligned
111 if ((address % sizeof(u32)) != 0) { 115 if ((address % sizeof(u32)) != 0) {
116 LOG_ERROR(Kernel, "Address is not 4-byte aligned! address={:016X}", address);
112 return ERR_INVALID_ADDRESS; 117 return ERR_INVALID_ADDRESS;
113 } 118 }
114 119