summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_light_lock.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-02-23 21:49:42 +0100
committerLiam <byteslice@airmail.cc>2023-03-01 16:42:45 +0100
commitc4ba088a5df13ff4b4d8853216231d690f2c79c0 (patch)
tree342ac4bde84bf135918bf425b5271a3599d572db /src/core/hle/kernel/k_light_lock.cpp
parentkernel: simplify AddressSpaceInfo, update values (diff)
downloadyuzu-c4ba088a5df13ff4b4d8853216231d690f2c79c0.tar
yuzu-c4ba088a5df13ff4b4d8853216231d690f2c79c0.tar.gz
yuzu-c4ba088a5df13ff4b4d8853216231d690f2c79c0.tar.bz2
yuzu-c4ba088a5df13ff4b4d8853216231d690f2c79c0.tar.lz
yuzu-c4ba088a5df13ff4b4d8853216231d690f2c79c0.tar.xz
yuzu-c4ba088a5df13ff4b4d8853216231d690f2c79c0.tar.zst
yuzu-c4ba088a5df13ff4b4d8853216231d690f2c79c0.zip
Diffstat (limited to 'src/core/hle/kernel/k_light_lock.cpp')
-rw-r--r--src/core/hle/kernel/k_light_lock.cpp6
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);