mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-28 05:34:11 -04:00
kern: use 13.0.0 revised KLightLock logic
This commit is contained in:
parent
3fc695aff8
commit
52332e8d75
2 changed files with 12 additions and 15 deletions
|
@ -31,7 +31,7 @@ namespace ams::kern {
|
|||
|
||||
}
|
||||
|
||||
void KLightLock::LockSlowPath(uintptr_t _owner, uintptr_t _cur_thread) {
|
||||
bool KLightLock::LockSlowPath(uintptr_t _owner, uintptr_t _cur_thread) {
|
||||
KThread *cur_thread = reinterpret_cast<KThread *>(_cur_thread);
|
||||
ThreadQueueImplForKLightLock wait_queue;
|
||||
|
||||
|
@ -40,8 +40,8 @@ namespace ams::kern {
|
|||
KScopedSchedulerLock sl;
|
||||
|
||||
/* Ensure we actually have locking to do. */
|
||||
if (AMS_UNLIKELY(m_tag.load(std::memory_order_relaxed) != _owner)) {
|
||||
return;
|
||||
if (m_tag.load(std::memory_order_relaxed) != _owner) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Add the current thread as a waiter on the owner. */
|
||||
|
@ -56,6 +56,8 @@ namespace ams::kern {
|
|||
owner_thread->ContinueIfHasKernelWaiters();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void KLightLock::UnlockSlowPath(uintptr_t _cur_thread) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue