diff options
| author | Liam <byteslice@airmail.cc> | 2023-02-23 15:49:42 -0500 |
|---|---|---|
| committer | Liam <byteslice@airmail.cc> | 2023-03-01 10:42:45 -0500 |
| commit | c4ba088a5df13ff4b4d8853216231d690f2c79c0 (patch) | |
| tree | 342ac4bde84bf135918bf425b5271a3599d572db /src/core/hle/kernel/k_light_lock.cpp | |
| parent | 96bd7ea42d1bb1188fd099c52569fe7ee0d92a92 (diff) | |
kernel: refactor priority inheritance to represent locks as C++ objects
Diffstat (limited to 'src/core/hle/kernel/k_light_lock.cpp')
| -rw-r--r-- | src/core/hle/kernel/k_light_lock.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/k_light_lock.cpp b/src/core/hle/kernel/k_light_lock.cpp index d791acbe3..b922a67a5 100644 --- a/src/core/hle/kernel/k_light_lock.cpp +++ b/src/core/hle/kernel/k_light_lock.cpp @@ -90,15 +90,15 @@ void KLightLock::UnlockSlowPath(uintptr_t _cur_thread) { KScopedSchedulerLock sl(kernel); // Get the next owner. - s32 num_waiters; + bool has_waiters; KThread* next_owner = owner_thread->RemoveWaiterByKey( - std::addressof(num_waiters), reinterpret_cast<uintptr_t>(std::addressof(tag))); + std::addressof(has_waiters), reinterpret_cast<uintptr_t>(std::addressof(tag))); // Pass the lock to the next owner. uintptr_t next_tag = 0; if (next_owner != nullptr) { next_tag = - reinterpret_cast<uintptr_t>(next_owner) | static_cast<uintptr_t>(num_waiters > 1); + reinterpret_cast<uintptr_t>(next_owner) | static_cast<uintptr_t>(has_waiters); next_owner->EndWait(ResultSuccess); |
