diff options
author | bunnei <bunneidev@gmail.com> | 2018-05-08 04:57:39 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-05-11 01:34:53 +0200 |
commit | edc52250b8157a9d2b8c909225114c98c7ea609e (patch) | |
tree | ecef7f8e5405ccc6221de2ec713df1baac226eee /src/core/core.h | |
parent | thread: Support core change on ResumeFromWait and improve ChangeCore. (diff) | |
download | yuzu-edc52250b8157a9d2b8c909225114c98c7ea609e.tar yuzu-edc52250b8157a9d2b8c909225114c98c7ea609e.tar.gz yuzu-edc52250b8157a9d2b8c909225114c98c7ea609e.tar.bz2 yuzu-edc52250b8157a9d2b8c909225114c98c7ea609e.tar.lz yuzu-edc52250b8157a9d2b8c909225114c98c7ea609e.tar.xz yuzu-edc52250b8157a9d2b8c909225114c98c7ea609e.tar.zst yuzu-edc52250b8157a9d2b8c909225114c98c7ea609e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/core.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/core/core.h b/src/core/core.h index 5740e858b..6de707271 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -160,13 +160,8 @@ public: } private: - /// Returns the current CPU core based on the calling host thread - Cpu& CurrentCpuCore() { - const auto& search = thread_to_cpu.find(std::this_thread::get_id()); - ASSERT(search != thread_to_cpu.end()); - ASSERT(search->second); - return *search->second; - } + /// Returns the currently running CPU core + Cpu& CurrentCpuCore(); /** * Initialize the emulated system. @@ -184,6 +179,7 @@ private: std::shared_ptr<CpuBarrier> cpu_barrier; std::array<std::shared_ptr<Cpu>, NUM_CPU_CORES> cpu_cores; std::array<std::unique_ptr<std::thread>, NUM_CPU_CORES - 1> cpu_core_threads; + size_t active_core{}; ///< Active core, only used in single thread mode /// Service manager std::shared_ptr<Service::SM::ServiceManager> service_manager; |