hle: kernel: Ensure all kernel objects with KAutoObject are properly created.

This commit is contained in:
bunnei
2021-04-09 16:56:11 -07:00
parent 722195cf70
commit ab704acab8
20 changed files with 55 additions and 0 deletions

View File

@ -793,6 +793,7 @@ void KScheduler::UpdateLastContextSwitchTime(KThread* thread, Process* process)
void KScheduler::Initialize() {
idle_thread = std::make_unique<KThread>(system.Kernel());
KAutoObject::Create(idle_thread.get());
ASSERT(KThread::InitializeIdleThread(system, idle_thread.get(), core_id).IsSuccess());
idle_thread->SetName(fmt::format("IdleThread:{}", core_id));
}