mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-22 20:06:40 +00:00
kern: fix bug in KScheduler::ClearPreviousThread
This commit is contained in:
parent
3ace441b1c
commit
717265a54c
1 changed files with 2 additions and 1 deletions
|
@ -281,7 +281,8 @@ namespace ams::kern {
|
|||
static_assert(std::atomic_ref<KThread *>::is_always_lock_free);
|
||||
|
||||
/* 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 a new issue