diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-01-25 23:55:32 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-01-25 23:55:32 +0100 |
commit | 4d6a86b03fe6ae0d98838a21613b66d5196150af (patch) | |
tree | 21f4b8e63e6435b2d816936af8b494882a3cdfb2 /src/core/cpu_core_manager.h | |
parent | Kernel: Implement Physical Core. (diff) | |
download | yuzu-4d6a86b03fe6ae0d98838a21613b66d5196150af.tar yuzu-4d6a86b03fe6ae0d98838a21613b66d5196150af.tar.gz yuzu-4d6a86b03fe6ae0d98838a21613b66d5196150af.tar.bz2 yuzu-4d6a86b03fe6ae0d98838a21613b66d5196150af.tar.lz yuzu-4d6a86b03fe6ae0d98838a21613b66d5196150af.tar.xz yuzu-4d6a86b03fe6ae0d98838a21613b66d5196150af.tar.zst yuzu-4d6a86b03fe6ae0d98838a21613b66d5196150af.zip |
Diffstat (limited to 'src/core/cpu_core_manager.h')
-rw-r--r-- | src/core/cpu_core_manager.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/core/cpu_core_manager.h b/src/core/cpu_core_manager.h index 2cbbf8216..2a7f84d5c 100644 --- a/src/core/cpu_core_manager.h +++ b/src/core/cpu_core_manager.h @@ -12,8 +12,6 @@ namespace Core { class Cpu; -class CpuBarrier; -class ExclusiveMonitor; class System; class CpuCoreManager { @@ -28,7 +26,6 @@ public: CpuCoreManager& operator=(CpuCoreManager&&) = delete; void Initialize(); - void StartThreads(); void Shutdown(); Cpu& GetCore(std::size_t index); @@ -37,25 +34,18 @@ public: Cpu& GetCurrentCore(); const Cpu& GetCurrentCore() const; - ExclusiveMonitor& GetExclusiveMonitor(); - const ExclusiveMonitor& GetExclusiveMonitor() const; + std::size_t GetCurrentCoreIndex() const { + return active_core; + } void RunLoop(bool tight_loop); - void InvalidateAllInstructionCaches(); - private: static constexpr std::size_t NUM_CPU_CORES = 4; - std::unique_ptr<ExclusiveMonitor> exclusive_monitor; - std::unique_ptr<CpuBarrier> barrier; std::array<std::unique_ptr<Cpu>, NUM_CPU_CORES> cores; - std::array<std::unique_ptr<std::thread>, NUM_CPU_CORES - 1> core_threads; std::size_t active_core{}; ///< Active core, only used in single thread mode - /// Map of guest threads to CPU cores - std::map<std::thread::id, Cpu*> thread_to_cpu; - System& system; }; |