diff options
| author | 2021-09-06 03:49:14 -0700 | |
|---|---|---|
| committer | 2021-09-06 03:49:14 -0700 | |
| commit | 51ccc29cdd2e8ac7aa1a10dfdef12ad981c67056 (patch) | |
| tree | 50bf923ae390709e5e40e5479e0cb719c1464846 /src/core/cpu_manager.h | |
| parent | Merge pull request #6968 from bunnei/nvflinger-event (diff) | |
| parent | core: cpu_manager: Use jthread. (diff) | |
| download | yuzu-51ccc29cdd2e8ac7aa1a10dfdef12ad981c67056.tar.gz yuzu-51ccc29cdd2e8ac7aa1a10dfdef12ad981c67056.tar.xz yuzu-51ccc29cdd2e8ac7aa1a10dfdef12ad981c67056.zip | |
Merge pull request #6965 from bunnei/cpu_manager_jthread
core: cpu_manager: Use jthread.
Diffstat (limited to 'src/core/cpu_manager.h')
| -rw-r--r-- | src/core/cpu_manager.h | 6 |
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: | |||
| 78 | void SingleCoreRunSuspendThread(); | 78 | void SingleCoreRunSuspendThread(); |
| 79 | void SingleCorePause(bool paused); | 79 | void SingleCorePause(bool paused); |
| 80 | 80 | ||
| 81 | static void ThreadStart(CpuManager& cpu_manager, std::size_t core); | 81 | static void ThreadStart(std::stop_token stop_token, CpuManager& cpu_manager, std::size_t core); |
| 82 | 82 | ||
| 83 | void RunThread(std::size_t core); | 83 | void RunThread(std::stop_token stop_token, std::size_t core); |
| 84 | 84 | ||
| 85 | struct CoreData { | 85 | struct CoreData { |
| 86 | std::shared_ptr<Common::Fiber> host_context; | 86 | std::shared_ptr<Common::Fiber> host_context; |
| @@ -89,7 +89,7 @@ private: | |||
| 89 | std::atomic<bool> is_running; | 89 | std::atomic<bool> is_running; |
| 90 | std::atomic<bool> is_paused; | 90 | std::atomic<bool> is_paused; |
| 91 | std::atomic<bool> initialized; | 91 | std::atomic<bool> initialized; |
| 92 | std::unique_ptr<std::thread> host_thread; | 92 | std::jthread host_thread; |
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| 95 | std::atomic<bool> running_mode{}; | 95 | std::atomic<bool> running_mode{}; |