summaryrefslogtreecommitdiff
path: root/src/core/cpu_manager.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2021-08-07 12:33:07 -0700
committerGravatar bunnei2021-12-06 16:39:17 -0800
commit08c63d5c75522ce6b484153302de4c6cfac674f2 (patch)
tree5aedfd853bafb5922c7e9313781bb45ca627cdad /src/core/cpu_manager.cpp
parentcore: hle: kernel: k_auto_object: Add GetName method. (diff)
downloadyuzu-08c63d5c75522ce6b484153302de4c6cfac674f2.tar.gz
yuzu-08c63d5c75522ce6b484153302de4c6cfac674f2.tar.xz
yuzu-08c63d5c75522ce6b484153302de4c6cfac674f2.zip
core: cpu_manager: Use invalid core_id on init and simplify shutdown.
Diffstat (limited to 'src/core/cpu_manager.cpp')
-rw-r--r--src/core/cpu_manager.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp
index 45cc176dc..d9bd5b665 100644
--- a/src/core/cpu_manager.cpp
+++ b/src/core/cpu_manager.cpp
@@ -32,7 +32,7 @@ void CpuManager::Initialize() {
32 core_data[core].host_thread = std::jthread(ThreadStart, std::ref(*this), core); 32 core_data[core].host_thread = std::jthread(ThreadStart, std::ref(*this), core);
33 } 33 }
34 } else { 34 } else {
35 core_data[0].host_thread = std::jthread(ThreadStart, std::ref(*this), 0); 35 core_data[0].host_thread = std::jthread(ThreadStart, std::ref(*this), -1);
36 } 36 }
37} 37}
38 38
@@ -347,13 +347,9 @@ void CpuManager::RunThread(std::stop_token stop_token, std::size_t core) {
347 sc_sync_first_use = false; 347 sc_sync_first_use = false;
348 } 348 }
349 349
350 // Abort if emulation was killed before the session really starts 350 // Emulation was stopped
351 if (!system.IsPoweredOn()) {
352 return;
353 }
354
355 if (stop_token.stop_requested()) { 351 if (stop_token.stop_requested()) {
356 break; 352 return;
357 } 353 }
358 354
359 auto current_thread = system.Kernel().CurrentScheduler()->GetCurrentThread(); 355 auto current_thread = system.Kernel().CurrentScheduler()->GetCurrentThread();