diff options
| author | bunnei <bunneidev@gmail.com> | 2018-08-30 10:02:50 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-30 10:02:50 -0400 |
| commit | 5094dfa081c7275e35496374a42996b11f0f6005 (patch) | |
| tree | 8cdfb8c270c6299a1b172fb9c14856684bedf084 /src/core/hle/kernel/mutex.cpp | |
| parent | 42ef40884f222bfd0dfa08cd56e01e89b0e2ab0f (diff) | |
| parent | 0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5 (diff) | |
Merge pull request #1198 from lioncash/kernel
kernel: Eliminate kernel global state
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 cb7f58b35..36bf0b677 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp @@ -58,15 +58,15 @@ static void TransferMutexOwnership(VAddr mutex_addr, SharedPtr<Thread> current_t } } -ResultCode Mutex::TryAcquire(VAddr address, Handle holding_thread_handle, +ResultCode Mutex::TryAcquire(HandleTable& handle_table, VAddr address, Handle holding_thread_handle, Handle requesting_thread_handle) { // The mutex address must be 4-byte aligned if ((address % sizeof(u32)) != 0) { return ResultCode(ErrorModule::Kernel, ErrCodes::InvalidAddress); } - SharedPtr<Thread> holding_thread = g_handle_table.Get<Thread>(holding_thread_handle); - SharedPtr<Thread> requesting_thread = g_handle_table.Get<Thread>(requesting_thread_handle); + SharedPtr<Thread> holding_thread = handle_table.Get<Thread>(holding_thread_handle); + SharedPtr<Thread> requesting_thread = handle_table.Get<Thread>(requesting_thread_handle); // TODO(Subv): It is currently unknown if it is possible to lock a mutex in behalf of another // thread. |
