mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-25 04:32:38 +02:00
kern: fix bug in KScheduler::ClearPreviousThread
This commit is contained in:
parent
1db868b95f
commit
e1e2be41d6
@ -281,7 +281,8 @@ namespace ams::kern {
|
|||||||
static_assert(std::atomic_ref<KThread *>::is_always_lock_free);
|
static_assert(std::atomic_ref<KThread *>::is_always_lock_free);
|
||||||
|
|
||||||
/* Atomically clear the previous thread if it's our target. */
|
/* Atomically clear the previous thread if it's our target. */
|
||||||
prev_thread.compare_exchange_weak(thread, nullptr);
|
KThread *compare = thread;
|
||||||
|
prev_thread.compare_exchange_weak(compare, nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user