diff options
author | Liam <byteslice@airmail.cc> | 2022-06-26 18:52:16 -0400 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-07-14 22:47:18 -0400 |
commit | 0624c880bd5af45ae9095465e079fa55458515f6 (patch) | |
tree | a8b9f3adf516af30cad021fc32f8669426946cd5 /src/core/cpu_manager.h | |
parent | 53fb4a78a3ab73b4233464b74be5fcf53b0424d0 (diff) |
kernel: use KScheduler from mesosphere
Diffstat (limited to 'src/core/cpu_manager.h')
-rw-r--r-- | src/core/cpu_manager.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/core/cpu_manager.h b/src/core/cpu_manager.h index 76dc58ee1e..8143424af2 100644 --- a/src/core/cpu_manager.h +++ b/src/core/cpu_manager.h @@ -5,6 +5,7 @@ #include <array> #include <atomic> +#include <csetjmp> #include <functional> #include <memory> #include <thread> @@ -47,10 +48,14 @@ public: gpu_barrier->Sync(); } + void WaitForAndHandleInterrupt(); void Initialize(); void Shutdown(); - std::function<void()> GetGuestThreadStartFunc() { + std::function<void()> GetGuestActivateFunc() { + return [this] { GuestActivateFunction(); }; + } + std::function<void()> GetGuestThreadFunc() { return [this] { GuestThreadFunction(); }; } std::function<void()> GetIdleThreadStartFunc() { @@ -67,21 +72,22 @@ public: } private: + void GuestActivateFunction(); void GuestThreadFunction(); - void GuestRewindFunction(); void IdleThreadFunction(); void ShutdownThreadFunction(); + void MultiCoreGuestActivate(); void MultiCoreRunGuestThread(); void MultiCoreRunGuestLoop(); - void MultiCoreRunIdleThread(); + void SingleCoreGuestActivate(); void SingleCoreRunGuestThread(); void SingleCoreRunGuestLoop(); - void SingleCoreRunIdleThread(); static void ThreadStart(std::stop_token stop_token, CpuManager& cpu_manager, std::size_t core); + void HandleInterrupt(); void ShutdownThread(); void RunThread(std::size_t core); |