diff options
| author | 2021-08-06 22:32:48 -0700 | |
|---|---|---|
| committer | 2021-08-07 12:18:47 -0700 | |
| commit | 5ea0d3629a595c18b3b4f825c6b8013009b2e7cc (patch) | |
| tree | bab9c73e1aea8a100fcece83b2ea3f60e2c379b3 /src/core/cpu_manager.h | |
| parent | Merge pull request #6795 from sankasan/cmd-remove-cursor-fullscreen (diff) | |
| download | yuzu-5ea0d3629a595c18b3b4f825c6b8013009b2e7cc.tar.gz yuzu-5ea0d3629a595c18b3b4f825c6b8013009b2e7cc.tar.xz yuzu-5ea0d3629a595c18b3b4f825c6b8013009b2e7cc.zip | |
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{}; |