diff options
author | Liam <byteslice@airmail.cc> | 2022-07-02 18:33:49 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-07-02 18:33:49 +0200 |
commit | ed0319cfed2c99e6366aaf725d96bb28a9332e4d (patch) | |
tree | 1598e6d320005e0d177106e28ebc6728234f1f24 /src/core/cpu_manager.h | |
parent | Merge pull request #7454 from FernandoS27/new-core-timing (diff) | |
download | yuzu-ed0319cfed2c99e6366aaf725d96bb28a9332e4d.tar yuzu-ed0319cfed2c99e6366aaf725d96bb28a9332e4d.tar.gz yuzu-ed0319cfed2c99e6366aaf725d96bb28a9332e4d.tar.bz2 yuzu-ed0319cfed2c99e6366aaf725d96bb28a9332e4d.tar.lz yuzu-ed0319cfed2c99e6366aaf725d96bb28a9332e4d.tar.xz yuzu-ed0319cfed2c99e6366aaf725d96bb28a9332e4d.tar.zst yuzu-ed0319cfed2c99e6366aaf725d96bb28a9332e4d.zip |
Diffstat (limited to 'src/core/cpu_manager.h')
-rw-r--r-- | src/core/cpu_manager.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/core/cpu_manager.h b/src/core/cpu_manager.h index f0751fc58..76dc58ee1 100644 --- a/src/core/cpu_manager.h +++ b/src/core/cpu_manager.h @@ -50,10 +50,15 @@ public: void Initialize(); void Shutdown(); - static std::function<void(void*)> GetGuestThreadStartFunc(); - static std::function<void(void*)> GetIdleThreadStartFunc(); - static std::function<void(void*)> GetShutdownThreadStartFunc(); - void* GetStartFuncParameter(); + std::function<void()> GetGuestThreadStartFunc() { + return [this] { GuestThreadFunction(); }; + } + std::function<void()> GetIdleThreadStartFunc() { + return [this] { IdleThreadFunction(); }; + } + std::function<void()> GetShutdownThreadStartFunc() { + return [this] { ShutdownThreadFunction(); }; + } void PreemptSingleCore(bool from_running_enviroment = true); @@ -62,10 +67,10 @@ public: } private: - static void GuestThreadFunction(void* cpu_manager); - static void GuestRewindFunction(void* cpu_manager); - static void IdleThreadFunction(void* cpu_manager); - static void ShutdownThreadFunction(void* cpu_manager); + void GuestThreadFunction(); + void GuestRewindFunction(); + void IdleThreadFunction(); + void ShutdownThreadFunction(); void MultiCoreRunGuestThread(); void MultiCoreRunGuestLoop(); |