summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 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) {
54 } 54 }
55 55
56 // Add the current thread as a waiter on the owner. 56 // Add the current thread as a waiter on the owner.
57 KThread* owner_thread = reinterpret_cast<KThread*>(_owner & ~1ul); 57 KThread* owner_thread = reinterpret_cast<KThread*>(_owner & ~1ULL);
58 cur_thread->SetAddressKey(reinterpret_cast<uintptr_t>(std::addressof(tag))); 58 cur_thread->SetAddressKey(reinterpret_cast<uintptr_t>(std::addressof(tag)));
59 owner_thread->AddWaiter(cur_thread); 59 owner_thread->AddWaiter(cur_thread);
60 60
@@ -67,7 +67,6 @@ void KLightLock::LockSlowPath(uintptr_t _owner, uintptr_t _cur_thread) {
67 67
68 if (owner_thread->IsSuspended()) { 68 if (owner_thread->IsSuspended()) {
69 owner_thread->ContinueIfHasKernelWaiters(); 69 owner_thread->ContinueIfHasKernelWaiters();
70 KScheduler::SetSchedulerUpdateNeeded(kernel);
71 } 70 }
72 } 71 }
73 72
@@ -77,6 +76,7 @@ void KLightLock::LockSlowPath(uintptr_t _owner, uintptr_t _cur_thread) {
77 KThread* owner_thread = cur_thread->GetLockOwner(); 76 KThread* owner_thread = cur_thread->GetLockOwner();
78 if (owner_thread) { 77 if (owner_thread) {
79 owner_thread->RemoveWaiter(cur_thread); 78 owner_thread->RemoveWaiter(cur_thread);
79 KScheduler::SetSchedulerUpdateNeeded(kernel);
80 } 80 }
81 } 81 }
82} 82}
@@ -124,7 +124,7 @@ void KLightLock::UnlockSlowPath(uintptr_t _cur_thread) {
124} 124}
125 125
126bool KLightLock::IsLockedByCurrentThread() const { 126bool KLightLock::IsLockedByCurrentThread() const {
127 return (tag | 0x1ul) == (reinterpret_cast<uintptr_t>(GetCurrentThreadPointer(kernel)) | 0x1ul); 127 return (tag | 1ULL) == (reinterpret_cast<uintptr_t>(GetCurrentThreadPointer(kernel)) | 1ULL);
128} 128}
129 129
130} // namespace Kernel 130} // namespace Kernel