summaryrefslogtreecommitdiffstats
path: root/src/core/cpu_manager.h
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-06-14 00:36:30 +0200
committerLiam <byteslice@airmail.cc>2022-06-14 16:04:11 +0200
commit888f499188cb869dc8f8f1597c46add65c005324 (patch)
tree2abcaaf69fcb2c15352c99add7a97c9eea567486 /src/core/cpu_manager.h
parentMerge pull request #8461 from Morph1984/msvc-narrow-conv (diff)
downloadyuzu-888f499188cb869dc8f8f1597c46add65c005324.tar
yuzu-888f499188cb869dc8f8f1597c46add65c005324.tar.gz
yuzu-888f499188cb869dc8f8f1597c46add65c005324.tar.bz2
yuzu-888f499188cb869dc8f8f1597c46add65c005324.tar.lz
yuzu-888f499188cb869dc8f8f1597c46add65c005324.tar.xz
yuzu-888f499188cb869dc8f8f1597c46add65c005324.tar.zst
yuzu-888f499188cb869dc8f8f1597c46add65c005324.zip
Diffstat (limited to 'src/core/cpu_manager.h')
-rw-r--r--src/core/cpu_manager.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/core/cpu_manager.h b/src/core/cpu_manager.h
index ddd9691ca..681bdaf19 100644
--- a/src/core/cpu_manager.h
+++ b/src/core/cpu_manager.h
@@ -46,12 +46,10 @@ public:
void Initialize();
void Shutdown();
- void Pause(bool paused);
-
static std::function<void(void*)> GetGuestThreadStartFunc();
static std::function<void(void*)> GetIdleThreadStartFunc();
- static std::function<void(void*)> GetSuspendThreadStartFunc();
- void* GetStartFuncParamater();
+ static std::function<void(void*)> GetShutdownThreadStartFunc();
+ void* GetStartFuncParameter();
void PreemptSingleCore(bool from_running_enviroment = true);
@@ -63,38 +61,33 @@ private:
static void GuestThreadFunction(void* cpu_manager);
static void GuestRewindFunction(void* cpu_manager);
static void IdleThreadFunction(void* cpu_manager);
- static void SuspendThreadFunction(void* cpu_manager);
+ static void ShutdownThreadFunction(void* cpu_manager);
void MultiCoreRunGuestThread();
void MultiCoreRunGuestLoop();
void MultiCoreRunIdleThread();
- void MultiCoreRunSuspendThread();
void SingleCoreRunGuestThread();
void SingleCoreRunGuestLoop();
void SingleCoreRunIdleThread();
- void SingleCoreRunSuspendThread();
static void ThreadStart(std::stop_token stop_token, CpuManager& cpu_manager, std::size_t core);
- void RunThread(std::stop_token stop_token, std::size_t core);
+ void ShutdownThread();
+ void RunThread(std::size_t core);
struct CoreData {
std::shared_ptr<Common::Fiber> host_context;
std::jthread host_thread;
};
- std::atomic<bool> running_mode{};
- 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{};
bool is_async_gpu{};
bool is_multicore{};
std::atomic<std::size_t> current_core{};
std::size_t idle_count{};
+ std::size_t num_cores{};
static constexpr std::size_t max_cycle_runs = 5;
System& system;