From f4e795193bddb18cfae3b84091979a313efd390f Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 23 Feb 2023 15:49:42 -0500 Subject: kernel: refactor priority inheritance to represent locks as C++ objects --- src/core/hle/kernel/k_light_lock.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/hle/kernel/k_light_lock.cpp') diff --git a/src/core/hle/kernel/k_light_lock.cpp b/src/core/hle/kernel/k_light_lock.cpp index d791acbe32..b922a67a5a 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(std::addressof(tag))); + std::addressof(has_waiters), reinterpret_cast(std::addressof(tag))); // Pass the lock to the next owner. uintptr_t next_tag = 0; if (next_owner != nullptr) { next_tag = - reinterpret_cast(next_owner) | static_cast(num_waiters > 1); + reinterpret_cast(next_owner) | static_cast(has_waiters); next_owner->EndWait(ResultSuccess); -- cgit v1.2.3