diff options
Diffstat (limited to 'src/core/core.h')
| -rw-r--r-- | src/core/core.h | 12 |
1 files changed, 12 insertions, 0 deletions
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 @@ | |||
| 9 | #include <string> | 9 | #include <string> |
| 10 | #include <thread> | 10 | #include <thread> |
| 11 | #include "common/common_types.h" | 11 | #include "common/common_types.h" |
| 12 | #include "core/arm/exclusive_monitor.h" | ||
| 12 | #include "core/core_cpu.h" | 13 | #include "core/core_cpu.h" |
| 13 | #include "core/hle/kernel/kernel.h" | 14 | #include "core/hle/kernel/kernel.h" |
| 14 | #include "core/hle/kernel/scheduler.h" | 15 | #include "core/hle/kernel/scheduler.h" |
| @@ -114,6 +115,11 @@ public: | |||
| 114 | return CurrentCpuCore().ArmInterface(); | 115 | return CurrentCpuCore().ArmInterface(); |
| 115 | } | 116 | } |
| 116 | 117 | ||
| 118 | /// Gets the index of the currently running CPU core | ||
| 119 | size_t CurrentCoreIndex() { | ||
| 120 | return CurrentCpuCore().CoreIndex(); | ||
| 121 | } | ||
| 122 | |||
| 117 | /// Gets an ARM interface to the CPU core with the specified index | 123 | /// Gets an ARM interface to the CPU core with the specified index |
| 118 | ARM_Interface& ArmInterface(size_t core_index); | 124 | ARM_Interface& ArmInterface(size_t core_index); |
| 119 | 125 | ||
| @@ -130,6 +136,11 @@ public: | |||
| 130 | return *CurrentCpuCore().Scheduler(); | 136 | return *CurrentCpuCore().Scheduler(); |
| 131 | } | 137 | } |
| 132 | 138 | ||
| 139 | /// Gets the exclusive monitor | ||
| 140 | ExclusiveMonitor& Monitor() { | ||
| 141 | return *cpu_exclusive_monitor; | ||
| 142 | } | ||
| 143 | |||
| 133 | /// Gets the scheduler for the CPU core with the specified index | 144 | /// Gets the scheduler for the CPU core with the specified index |
| 134 | const std::shared_ptr<Kernel::Scheduler>& Scheduler(size_t core_index); | 145 | const std::shared_ptr<Kernel::Scheduler>& Scheduler(size_t core_index); |
| 135 | 146 | ||
| @@ -186,6 +197,7 @@ private: | |||
| 186 | std::unique_ptr<Tegra::GPU> gpu_core; | 197 | std::unique_ptr<Tegra::GPU> gpu_core; |
| 187 | std::shared_ptr<Tegra::DebugContext> debug_context; | 198 | std::shared_ptr<Tegra::DebugContext> debug_context; |
| 188 | Kernel::SharedPtr<Kernel::Process> current_process; | 199 | Kernel::SharedPtr<Kernel::Process> current_process; |
| 200 | std::shared_ptr<ExclusiveMonitor> cpu_exclusive_monitor; | ||
| 189 | std::shared_ptr<CpuBarrier> cpu_barrier; | 201 | std::shared_ptr<CpuBarrier> cpu_barrier; |
| 190 | std::array<std::shared_ptr<Cpu>, NUM_CPU_CORES> cpu_cores; | 202 | std::array<std::shared_ptr<Cpu>, NUM_CPU_CORES> cpu_cores; |
| 191 | std::array<std::unique_ptr<std::thread>, NUM_CPU_CORES - 1> cpu_core_threads; | 203 | std::array<std::unique_ptr<std::thread>, NUM_CPU_CORES - 1> cpu_core_threads; |