summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/mutex.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-11-28 17:43:17 +0100
committerGitHub <noreply@github.com>2019-11-28 17:43:17 +0100
commite3ee017e91ef4d713f1af8cb60c5157e40d43f18 (patch)
treee0a5b47cac1d548599b8ceba7f71b40746fe6b48 /src/core/hle/kernel/mutex.cpp
parentMerge pull request #3171 from lioncash/internal-link (diff)
parentcore/memory; Migrate over SetCurrentPageTable() to the Memory class (diff)
downloadyuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.tar
yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.tar.gz
yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.tar.bz2
yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.tar.lz
yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.tar.xz
yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.tar.zst
yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.zip
Diffstat (limited to 'src/core/hle/kernel/mutex.cpp')
-rw-r--r--src/core/hle/kernel/mutex.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp
index 8493d0f78..061e9bcb0 100644
--- a/src/core/hle/kernel/mutex.cpp
+++ b/src/core/hle/kernel/mutex.cpp
@@ -79,7 +79,7 @@ ResultCode Mutex::TryAcquire(VAddr address, Handle holding_thread_handle,
// thread.
ASSERT(requesting_thread == current_thread);
- const u32 addr_value = Memory::Read32(address);
+ const u32 addr_value = system.Memory().Read32(address);
// If the mutex isn't being held, just return success.
if (addr_value != (holding_thread_handle | Mutex::MutexHasWaitersFlag)) {
@@ -117,7 +117,7 @@ ResultCode Mutex::Release(VAddr address) {
// There are no more threads waiting for the mutex, release it completely.
if (thread == nullptr) {
- Memory::Write32(address, 0);
+ system.Memory().Write32(address, 0);
return RESULT_SUCCESS;
}
@@ -132,7 +132,7 @@ ResultCode Mutex::Release(VAddr address) {
}
// Grant the mutex to the next waiting thread and resume it.
- Memory::Write32(address, mutex_value);
+ system.Memory().Write32(address, mutex_value);
ASSERT(thread->GetStatus() == ThreadStatus::WaitMutex);
thread->ResumeFromWait();