summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-03-11 20:44:53 -0400
committerGravatar Fernando Sahmkow2020-06-27 11:35:47 -0400
commite6f8bde74b9476dced103c6c54ab81616d34b97e (patch)
tree488d71b9de2368944b99b0a188adb84826f1167a /src/core/hle/kernel/kernel.cpp
parentKernel: Rewind on SVC change. (diff)
downloadyuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.tar.gz
yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.tar.xz
yuzu-e6f8bde74b9476dced103c6c54ab81616d34b97e.zip
General: Fix Stop function
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r--src/core/hle/kernel/kernel.cpp15
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 {
119 119
120 void Initialize(KernelCore& kernel) { 120 void Initialize(KernelCore& kernel) {
121 Shutdown(); 121 Shutdown();
122 RegisterHostThread();
122 123
123 InitializePhysicalCores(); 124 InitializePhysicalCores();
124 InitializeSystemResourceLimit(kernel); 125 InitializeSystemResourceLimit(kernel);
@@ -135,6 +136,19 @@ struct KernelCore::Impl {
135 next_user_process_id = Process::ProcessIDMin; 136 next_user_process_id = Process::ProcessIDMin;
136 next_thread_id = 1; 137 next_thread_id = 1;
137 138
139 for (std::size_t i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) {
140 if (suspend_threads[i]) {
141 suspend_threads[i].reset();
142 }
143 }
144
145 for (std::size_t i = 0; i < cores.size(); i++) {
146 cores[i].Shutdown();
147 }
148 cores.clear();
149
150 registered_core_threads.reset();
151
138 process_list.clear(); 152 process_list.clear();
139 current_process = nullptr; 153 current_process = nullptr;
140 154
@@ -154,6 +168,7 @@ struct KernelCore::Impl {
154 cores.clear(); 168 cores.clear();
155 169
156 exclusive_monitor.reset(); 170 exclusive_monitor.reset();
171 host_thread_ids.clear();
157 } 172 }
158 173
159 void InitializePhysicalCores() { 174 void InitializePhysicalCores() {