summaryrefslogtreecommitdiff
path: root/src/core/cpu_manager.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-08-18 15:42:46 -0700
committerGitHub <noreply@github.com>2021-08-18 15:42:46 -0700
commitaa40084c241129ef08081bae72bd5de1b4c86348 (patch)
treeb4f406cbf0f230cf9064040992ce3ef8bf54e5a7 /src/core/cpu_manager.h
parent521e6ac17483e975e2fc731fed879e9f3edf7547 (diff)
parentaef0ca6f0d422623f46f47c15e9a4c9b5fd04dd0 (diff)
Merge pull request #6832 from bunnei/scheduler-improvements
kernel: Various improvements to scheduler
Diffstat (limited to 'src/core/cpu_manager.h')
-rw-r--r--src/core/cpu_manager.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/cpu_manager.h b/src/core/cpu_manager.h
index 140263b09..9d92d4af0 100644
--- a/src/core/cpu_manager.h
+++ b/src/core/cpu_manager.h
@@ -78,9 +78,9 @@ private:
void SingleCoreRunSuspendThread();
void SingleCorePause(bool paused);
- static void ThreadStart(CpuManager& cpu_manager, std::size_t core);
+ static void ThreadStart(std::stop_token stop_token, CpuManager& cpu_manager, std::size_t core);
- void RunThread(std::size_t core);
+ void RunThread(std::stop_token stop_token, std::size_t core);
struct CoreData {
std::shared_ptr<Common::Fiber> host_context;
@@ -89,7 +89,7 @@ private:
std::atomic<bool> is_running;
std::atomic<bool> is_paused;
std::atomic<bool> initialized;
- std::unique_ptr<std::thread> host_thread;
+ std::jthread host_thread;
};
std::atomic<bool> running_mode{};