diff options
Diffstat (limited to 'src/core/cpu_manager.h')
-rw-r--r-- | src/core/cpu_manager.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/core/cpu_manager.h b/src/core/cpu_manager.h index aee352245..ddd9691ca 100644 --- a/src/core/cpu_manager.h +++ b/src/core/cpu_manager.h @@ -69,13 +69,11 @@ private: void MultiCoreRunGuestLoop(); void MultiCoreRunIdleThread(); void MultiCoreRunSuspendThread(); - void MultiCorePause(bool paused); void SingleCoreRunGuestThread(); void SingleCoreRunGuestLoop(); void SingleCoreRunIdleThread(); void SingleCoreRunSuspendThread(); - void SingleCorePause(bool paused); static void ThreadStart(std::stop_token stop_token, CpuManager& cpu_manager, std::size_t core); @@ -83,16 +81,13 @@ private: struct CoreData { std::shared_ptr<Common::Fiber> host_context; - std::unique_ptr<Common::Event> enter_barrier; - std::unique_ptr<Common::Event> exit_barrier; - std::atomic<bool> is_running; - std::atomic<bool> is_paused; - std::atomic<bool> initialized; std::jthread host_thread; }; std::atomic<bool> running_mode{}; - std::atomic<bool> paused_state{}; + std::atomic<bool> pause_state{}; + std::unique_ptr<Common::Barrier> pause_barrier{}; + std::mutex pause_lock{}; std::array<CoreData, Core::Hardware::NUM_CPU_CORES> core_data{}; |