summaryrefslogtreecommitdiffstats
path: root/src/core/cpu_manager.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-09-06 12:49:14 +0200
committerGitHub <noreply@github.com>2021-09-06 12:49:14 +0200
commit51ccc29cdd2e8ac7aa1a10dfdef12ad981c67056 (patch)
tree50bf923ae390709e5e40e5479e0cb719c1464846 /src/core/cpu_manager.h
parentMerge pull request #6968 from bunnei/nvflinger-event (diff)
parentcore: cpu_manager: Use jthread. (diff)
downloadyuzu-51ccc29cdd2e8ac7aa1a10dfdef12ad981c67056.tar
yuzu-51ccc29cdd2e8ac7aa1a10dfdef12ad981c67056.tar.gz
yuzu-51ccc29cdd2e8ac7aa1a10dfdef12ad981c67056.tar.bz2
yuzu-51ccc29cdd2e8ac7aa1a10dfdef12ad981c67056.tar.lz
yuzu-51ccc29cdd2e8ac7aa1a10dfdef12ad981c67056.tar.xz
yuzu-51ccc29cdd2e8ac7aa1a10dfdef12ad981c67056.tar.zst
yuzu-51ccc29cdd2e8ac7aa1a10dfdef12ad981c67056.zip
Diffstat (limited to '')
-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{};