diff options
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r-- | src/core/hle/kernel/k_scheduler.cpp | 1 | ||||
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_scheduler.cpp b/src/core/hle/kernel/k_scheduler.cpp index c048d86a3..09382f7dd 100644 --- a/src/core/hle/kernel/k_scheduler.cpp +++ b/src/core/hle/kernel/k_scheduler.cpp @@ -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)); } diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 1249a4c96..43bce1863 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -196,6 +196,7 @@ struct KernelCore::Impl { void InitializeSuspendThreads() { for (s32 core_id = 0; core_id < Core::Hardware::NUM_CPU_CORES; core_id++) { suspend_threads[core_id] = std::make_unique<KThread>(system.Kernel()); + KAutoObject::Create(suspend_threads[core_id].get()); ASSERT(KThread::InitializeHighPriorityThread(system, suspend_threads[core_id].get(), {}, {}, core_id) .IsSuccess()); @@ -236,6 +237,7 @@ struct KernelCore::Impl { KThread* GetHostDummyThread() { auto make_thread = [this]() { std::unique_ptr<KThread> thread = std::make_unique<KThread>(system.Kernel()); + KAutoObject::Create(thread.get()); ASSERT(KThread::InitializeDummyThread(thread.get()).IsSuccess()); thread->SetName(fmt::format("DummyThread:{}", GetHostThreadId())); return std::move(thread); @@ -580,6 +582,11 @@ struct KernelCore::Impl { irs_shared_mem = std::make_unique<KSharedMemory>(system.Kernel()); time_shared_mem = std::make_unique<KSharedMemory>(system.Kernel()); + KAutoObject::Create(hid_shared_mem.get()); + KAutoObject::Create(font_shared_mem.get()); + KAutoObject::Create(irs_shared_mem.get()); + KAutoObject::Create(time_shared_mem.get()); + hid_shared_mem->Initialize(system.Kernel(), system.DeviceMemory(), nullptr, {hid_phys_addr, hid_size / PageSize}, KMemoryPermission::None, KMemoryPermission::Read, hid_phys_addr, hid_size, |