diff options
author | bunnei <bunneidev@gmail.com> | 2021-04-10 01:56:11 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-05-06 01:40:51 +0200 |
commit | ab704acab80d17f9a8e34dcbb753d60de2a86f86 (patch) | |
tree | 41b84d29f755f19f2222bef358631f88c6f2152f /src/core/hle/kernel/kernel.cpp | |
parent | hle: kernel: Use unique_ptr for suspend and dummy threads. (diff) | |
download | yuzu-ab704acab80d17f9a8e34dcbb753d60de2a86f86.tar yuzu-ab704acab80d17f9a8e34dcbb753d60de2a86f86.tar.gz yuzu-ab704acab80d17f9a8e34dcbb753d60de2a86f86.tar.bz2 yuzu-ab704acab80d17f9a8e34dcbb753d60de2a86f86.tar.lz yuzu-ab704acab80d17f9a8e34dcbb753d60de2a86f86.tar.xz yuzu-ab704acab80d17f9a8e34dcbb753d60de2a86f86.tar.zst yuzu-ab704acab80d17f9a8e34dcbb753d60de2a86f86.zip |
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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, |