summaryrefslogtreecommitdiffstats
path: root/src/core/cpu_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/cpu_manager.h')
-rw-r--r--src/core/cpu_manager.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/core/cpu_manager.h b/src/core/cpu_manager.h
index f0751fc58..95ea3ef39 100644
--- a/src/core/cpu_manager.h
+++ b/src/core/cpu_manager.h
@@ -50,10 +50,18 @@ 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()> GetGuestActivateFunc() {
+ return [this] { GuestActivate(); };
+ }
+ std::function<void()> GetGuestThreadFunc() {
+ 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,21 +70,20 @@ 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 IdleThreadFunction();
+ void ShutdownThreadFunction();
void MultiCoreRunGuestThread();
- void MultiCoreRunGuestLoop();
void MultiCoreRunIdleThread();
void SingleCoreRunGuestThread();
- void SingleCoreRunGuestLoop();
void SingleCoreRunIdleThread();
static void ThreadStart(std::stop_token stop_token, CpuManager& cpu_manager, std::size_t core);
+ void GuestActivate();
+ void HandleInterrupt();
void ShutdownThread();
void RunThread(std::size_t core);