diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-03-12 01:44:53 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-06-27 17:35:47 +0200 |
commit | e6f8bde74b9476dced103c6c54ab81616d34b97e (patch) | |
tree | 488d71b9de2368944b99b0a188adb84826f1167a /src/core/hle/kernel/kernel.cpp | |
parent | Kernel: Rewind on SVC change. (diff) | |
download | yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.tar yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.tar.gz yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.tar.bz2 yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.tar.lz yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.tar.xz yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.tar.zst yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.zip |
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 2a1b91752..24da4367e 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -119,6 +119,7 @@ struct KernelCore::Impl { void Initialize(KernelCore& kernel) { Shutdown(); + RegisterHostThread(); InitializePhysicalCores(); InitializeSystemResourceLimit(kernel); @@ -135,6 +136,19 @@ struct KernelCore::Impl { next_user_process_id = Process::ProcessIDMin; next_thread_id = 1; + for (std::size_t i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) { + if (suspend_threads[i]) { + suspend_threads[i].reset(); + } + } + + for (std::size_t i = 0; i < cores.size(); i++) { + cores[i].Shutdown(); + } + cores.clear(); + + registered_core_threads.reset(); + process_list.clear(); current_process = nullptr; @@ -154,6 +168,7 @@ struct KernelCore::Impl { cores.clear(); exclusive_monitor.reset(); + host_thread_ids.clear(); } void InitializePhysicalCores() { |