diff options
| author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-01-26 14:07:22 -0400 |
|---|---|---|
| committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-01-26 14:07:22 -0400 |
| commit | e4a1ead897575ee9222b4fc1021aaa9cc58f12c8 (patch) | |
| tree | ef544a51ba2480400df62d40706f68fa3ae62693 /src/core/core_cpu.h | |
| parent | 450341b397766caa32138882acb52790f4120963 (diff) | |
Core: Refactor CpuCoreManager to CpuManager and Cpu to Core Manager.
This commit instends on better naming the new purpose of this classes.
Diffstat (limited to 'src/core/core_cpu.h')
| -rw-r--r-- | src/core/core_cpu.h | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/src/core/core_cpu.h b/src/core/core_cpu.h deleted file mode 100644 index 6f7aec8f9..000000000 --- a/src/core/core_cpu.h +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2018 yuzu emulator team -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#pragma once - -#include <atomic> -#include <condition_variable> -#include <cstddef> -#include <memory> -#include <mutex> -#include "common/common_types.h" - -namespace Kernel { -class GlobalScheduler; -class PhysicalCore; -} // namespace Kernel - -namespace Core { -class System; -} - -namespace Core::Timing { -class CoreTiming; -} - -namespace Memory { -class Memory; -} - -namespace Core { - -constexpr unsigned NUM_CPU_CORES{4}; - -class Cpu { -public: - Cpu(System& system, std::size_t core_index); - ~Cpu(); - - void RunLoop(bool tight_loop = true); - - void SingleStep(); - - void PrepareReschedule(); - - bool IsMainCore() const { - return core_index == 0; - } - - std::size_t CoreIndex() const { - return core_index; - } - -private: - void Reschedule(); - - Kernel::GlobalScheduler& global_scheduler; - Kernel::PhysicalCore& physical_core; - Timing::CoreTiming& core_timing; - - std::atomic<bool> reschedule_pending = false; - std::size_t core_index; -}; - -} // namespace Core |
