diff options
author | bunnei <bunneidev@gmail.com> | 2019-11-28 17:43:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-28 17:43:17 +0100 |
commit | e3ee017e91ef4d713f1af8cb60c5157e40d43f18 (patch) | |
tree | e0a5b47cac1d548599b8ceba7f71b40746fe6b48 /src/core/hle/kernel/mutex.cpp | |
parent | Merge pull request #3171 from lioncash/internal-link (diff) | |
parent | core/memory; Migrate over SetCurrentPageTable() to the Memory class (diff) | |
download | yuzu-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.cpp | 6 |
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(); |