From 0b1c2e5505c6478ef10e65c0b002eeb242e15540 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Tue, 3 Jul 2018 14:28:46 +0100 Subject: Implement exclusive monitor --- src/core/core.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/core/core.h') diff --git a/src/core/core.h b/src/core/core.h index c6f69f001..c123fe401 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -9,6 +9,7 @@ #include #include #include "common/common_types.h" +#include "core/arm/exclusive_monitor.h" #include "core/core_cpu.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/scheduler.h" @@ -114,6 +115,11 @@ public: return CurrentCpuCore().ArmInterface(); } + /// Gets the index of the currently running CPU core + size_t CurrentCoreIndex() { + return CurrentCpuCore().CoreIndex(); + } + /// Gets an ARM interface to the CPU core with the specified index ARM_Interface& ArmInterface(size_t core_index); @@ -130,6 +136,11 @@ public: return *CurrentCpuCore().Scheduler(); } + /// Gets the exclusive monitor + ExclusiveMonitor& Monitor() { + return *cpu_exclusive_monitor; + } + /// Gets the scheduler for the CPU core with the specified index const std::shared_ptr& Scheduler(size_t core_index); @@ -186,6 +197,7 @@ private: std::unique_ptr gpu_core; std::shared_ptr debug_context; Kernel::SharedPtr current_process; + std::shared_ptr cpu_exclusive_monitor; std::shared_ptr cpu_barrier; std::array, NUM_CPU_CORES> cpu_cores; std::array, NUM_CPU_CORES - 1> cpu_core_threads; -- cgit v1.2.3