diff options
| author | 2019-11-28 11:43:17 -0500 | |
|---|---|---|
| committer | 2019-11-28 11:43:17 -0500 | |
| 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.gz yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.tar.xz yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.zip | |
Merge pull request #3169 from lioncash/memory
core/memory: Deglobalize memory management code
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, | |||
| 79 | // thread. | 79 | // thread. |
| 80 | ASSERT(requesting_thread == current_thread); | 80 | ASSERT(requesting_thread == current_thread); |
| 81 | 81 | ||
| 82 | const u32 addr_value = Memory::Read32(address); | 82 | const u32 addr_value = system.Memory().Read32(address); |
| 83 | 83 | ||
| 84 | // If the mutex isn't being held, just return success. | 84 | // If the mutex isn't being held, just return success. |
| 85 | if (addr_value != (holding_thread_handle | Mutex::MutexHasWaitersFlag)) { | 85 | if (addr_value != (holding_thread_handle | Mutex::MutexHasWaitersFlag)) { |
| @@ -117,7 +117,7 @@ ResultCode Mutex::Release(VAddr address) { | |||
| 117 | 117 | ||
| 118 | // There are no more threads waiting for the mutex, release it completely. | 118 | // There are no more threads waiting for the mutex, release it completely. |
| 119 | if (thread == nullptr) { | 119 | if (thread == nullptr) { |
| 120 | Memory::Write32(address, 0); | 120 | system.Memory().Write32(address, 0); |
| 121 | return RESULT_SUCCESS; | 121 | return RESULT_SUCCESS; |
| 122 | } | 122 | } |
| 123 | 123 | ||
| @@ -132,7 +132,7 @@ ResultCode Mutex::Release(VAddr address) { | |||
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | // Grant the mutex to the next waiting thread and resume it. | 134 | // Grant the mutex to the next waiting thread and resume it. |
| 135 | Memory::Write32(address, mutex_value); | 135 | system.Memory().Write32(address, mutex_value); |
| 136 | 136 | ||
| 137 | ASSERT(thread->GetStatus() == ThreadStatus::WaitMutex); | 137 | ASSERT(thread->GetStatus() == ThreadStatus::WaitMutex); |
| 138 | thread->ResumeFromWait(); | 138 | thread->ResumeFromWait(); |