mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 16:25:45 +00:00
core: hle: kernel: Ensure idle threads are closed before destroying scheduler.
This commit is contained in:
parent
669a2d2c67
commit
3bd5d4b6f8
3 changed files with 22 additions and 24 deletions
|
@ -617,13 +617,17 @@ KScheduler::KScheduler(Core::System& system_, s32 core_id_) : system{system_}, c
|
|||
state.highest_priority_thread = nullptr;
|
||||
}
|
||||
|
||||
KScheduler::~KScheduler() {
|
||||
void KScheduler::Finalize() {
|
||||
if (idle_thread) {
|
||||
idle_thread->Close();
|
||||
idle_thread = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
KScheduler::~KScheduler() {
|
||||
ASSERT(!idle_thread);
|
||||
}
|
||||
|
||||
KThread* KScheduler::GetCurrentThread() const {
|
||||
if (auto result = current_thread.load(); result) {
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue