diff options
| author | 2020-12-21 22:36:53 -0800 | |
|---|---|---|
| committer | 2021-01-11 14:23:16 -0800 | |
| commit | 35c3c078e3c079c0a9192b411e20c71b122ff057 (patch) | |
| tree | 572c0b6a47a249a78d658122de32908262ec6a69 /src/core/hle/kernel/mutex.cpp | |
| parent | core: hle: kernel: Begin moving common SVC results to its own header. (diff) | |
| download | yuzu-35c3c078e3c079c0a9192b411e20c71b122ff057.tar.gz yuzu-35c3c078e3c079c0a9192b411e20c71b122ff057.tar.xz yuzu-35c3c078e3c079c0a9192b411e20c71b122ff057.zip | |
core: hle: kernel: Update KSynchronizationObject.
Diffstat (limited to 'src/core/hle/kernel/mutex.cpp')
| -rw-r--r-- | src/core/hle/kernel/mutex.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index 4f8075e0e..badd883aa 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp | |||
| @@ -107,7 +107,7 @@ ResultCode Mutex::TryAcquire(VAddr address, Handle holding_thread_handle, | |||
| 107 | current_thread->SetMutexWaitAddress(address); | 107 | current_thread->SetMutexWaitAddress(address); |
| 108 | current_thread->SetWaitHandle(requesting_thread_handle); | 108 | current_thread->SetWaitHandle(requesting_thread_handle); |
| 109 | 109 | ||
| 110 | current_thread->SetStatus(ThreadStatus::WaitMutex); | 110 | current_thread->SetState(ThreadStatus::WaitMutex); |
| 111 | 111 | ||
| 112 | // Update the lock holder thread's priority to prevent priority inversion. | 112 | // Update the lock holder thread's priority to prevent priority inversion. |
| 113 | holding_thread->AddMutexWaiter(current_thread); | 113 | holding_thread->AddMutexWaiter(current_thread); |
| @@ -145,7 +145,7 @@ std::pair<ResultCode, std::shared_ptr<Thread>> Mutex::Unlock(std::shared_ptr<Thr | |||
| 145 | } | 145 | } |
| 146 | new_owner->SetSynchronizationResults(nullptr, RESULT_SUCCESS); | 146 | new_owner->SetSynchronizationResults(nullptr, RESULT_SUCCESS); |
| 147 | new_owner->SetLockOwner(nullptr); | 147 | new_owner->SetLockOwner(nullptr); |
| 148 | new_owner->ResumeFromWait(); | 148 | new_owner->Wakeup(); |
| 149 | 149 | ||
| 150 | system.Memory().Write32(address, mutex_value); | 150 | system.Memory().Write32(address, mutex_value); |
| 151 | return {RESULT_SUCCESS, new_owner}; | 151 | return {RESULT_SUCCESS, new_owner}; |