diff options
author | bunnei <bunneidev@gmail.com> | 2021-01-29 06:53:21 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-01-29 06:53:21 +0100 |
commit | 543e2125541aa3c3399dd471cd170153ce67c369 (patch) | |
tree | 946f12303f0d885f3257ea45d72cfa80dbae8cca /src | |
parent | common: common_funcs: Change R_UNLESS to LOG_ERROR. (diff) | |
download | yuzu-543e2125541aa3c3399dd471cd170153ce67c369.tar yuzu-543e2125541aa3c3399dd471cd170153ce67c369.tar.gz yuzu-543e2125541aa3c3399dd471cd170153ce67c369.tar.bz2 yuzu-543e2125541aa3c3399dd471cd170153ce67c369.tar.lz yuzu-543e2125541aa3c3399dd471cd170153ce67c369.tar.xz yuzu-543e2125541aa3c3399dd471cd170153ce67c369.tar.zst yuzu-543e2125541aa3c3399dd471cd170153ce67c369.zip |
Diffstat (limited to '')
-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 08fa65fd5..f974022e8 100644 --- a/src/core/hle/kernel/k_light_lock.cpp +++ b/src/core/hle/kernel/k_light_lock.cpp @@ -54,7 +54,7 @@ void KLightLock::LockSlowPath(uintptr_t _owner, uintptr_t _cur_thread) { } // Add the current thread as a waiter on the owner. - KThread* owner_thread = reinterpret_cast<KThread*>(_owner & ~1ul); + KThread* owner_thread = reinterpret_cast<KThread*>(_owner & ~1ULL); cur_thread->SetAddressKey(reinterpret_cast<uintptr_t>(std::addressof(tag))); owner_thread->AddWaiter(cur_thread); @@ -67,7 +67,6 @@ void KLightLock::LockSlowPath(uintptr_t _owner, uintptr_t _cur_thread) { if (owner_thread->IsSuspended()) { owner_thread->ContinueIfHasKernelWaiters(); - KScheduler::SetSchedulerUpdateNeeded(kernel); } } @@ -77,6 +76,7 @@ void KLightLock::LockSlowPath(uintptr_t _owner, uintptr_t _cur_thread) { KThread* owner_thread = cur_thread->GetLockOwner(); if (owner_thread) { owner_thread->RemoveWaiter(cur_thread); + KScheduler::SetSchedulerUpdateNeeded(kernel); } } } @@ -124,7 +124,7 @@ void KLightLock::UnlockSlowPath(uintptr_t _cur_thread) { } bool KLightLock::IsLockedByCurrentThread() const { - return (tag | 0x1ul) == (reinterpret_cast<uintptr_t>(GetCurrentThreadPointer(kernel)) | 0x1ul); + return (tag | 1ULL) == (reinterpret_cast<uintptr_t>(GetCurrentThreadPointer(kernel)) | 1ULL); } } // namespace Kernel |