aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/cpu_manager.h
diff options
context:
space:
mode:
authorLiam <[email protected]>2022-05-27 20:44:45 -0400
committerLiam <[email protected]>2022-06-08 21:47:29 -0400
commitaf022294dd7240a3199794e43dd8997fd0dbc136 (patch)
treecb2b6f5199829dec982fc8e20fc7f8167ceee596 /src/core/cpu_manager.h
parent073714a762d4ef529c5bef35b0317472ae661711 (diff)
downloadyuzu-android-af022294dd7240a3199794e43dd8997fd0dbc136.tar.gz
yuzu-android-af022294dd7240a3199794e43dd8997fd0dbc136.zip
CpuManager: simplify pausing
Diffstat (limited to 'src/core/cpu_manager.h')
-rw-r--r--src/core/cpu_manager.h11
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{};