summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/core_cpu.cpp3
-rw-r--r--src/core/core_cpu.h5
2 files changed, 6 insertions, 2 deletions
diff --git a/src/core/core_cpu.cpp b/src/core/core_cpu.cpp
index 15d60cc8a..21568ad50 100644
--- a/src/core/core_cpu.cpp
+++ b/src/core/core_cpu.cpp
@@ -9,6 +9,7 @@
9#ifdef ARCHITECTURE_x86_64 9#ifdef ARCHITECTURE_x86_64
10#include "core/arm/dynarmic/arm_dynarmic.h" 10#include "core/arm/dynarmic/arm_dynarmic.h"
11#endif 11#endif
12#include "core/arm/exclusive_monitor.h"
12#include "core/arm/unicorn/arm_unicorn.h" 13#include "core/arm/unicorn/arm_unicorn.h"
13#include "core/core_cpu.h" 14#include "core/core_cpu.h"
14#include "core/core_timing.h" 15#include "core/core_timing.h"
@@ -66,6 +67,8 @@ Cpu::Cpu(std::shared_ptr<ExclusiveMonitor> exclusive_monitor,
66 scheduler = std::make_shared<Kernel::Scheduler>(arm_interface.get()); 67 scheduler = std::make_shared<Kernel::Scheduler>(arm_interface.get());
67} 68}
68 69
70Cpu::~Cpu() = default;
71
69std::shared_ptr<ExclusiveMonitor> Cpu::MakeExclusiveMonitor(std::size_t num_cores) { 72std::shared_ptr<ExclusiveMonitor> Cpu::MakeExclusiveMonitor(std::size_t num_cores) {
70 if (Settings::values.use_cpu_jit) { 73 if (Settings::values.use_cpu_jit) {
71#ifdef ARCHITECTURE_x86_64 74#ifdef ARCHITECTURE_x86_64
diff --git a/src/core/core_cpu.h b/src/core/core_cpu.h
index 1d229b42f..685532965 100644
--- a/src/core/core_cpu.h
+++ b/src/core/core_cpu.h
@@ -6,11 +6,10 @@
6 6
7#include <atomic> 7#include <atomic>
8#include <condition_variable> 8#include <condition_variable>
9#include <cstddef>
9#include <memory> 10#include <memory>
10#include <mutex> 11#include <mutex>
11#include <string>
12#include "common/common_types.h" 12#include "common/common_types.h"
13#include "core/arm/exclusive_monitor.h"
14 13
15namespace Kernel { 14namespace Kernel {
16class Scheduler; 15class Scheduler;
@@ -19,6 +18,7 @@ class Scheduler;
19namespace Core { 18namespace Core {
20 19
21class ARM_Interface; 20class ARM_Interface;
21class ExclusiveMonitor;
22 22
23constexpr unsigned NUM_CPU_CORES{4}; 23constexpr unsigned NUM_CPU_CORES{4};
24 24
@@ -43,6 +43,7 @@ class Cpu {
43public: 43public:
44 Cpu(std::shared_ptr<ExclusiveMonitor> exclusive_monitor, 44 Cpu(std::shared_ptr<ExclusiveMonitor> exclusive_monitor,
45 std::shared_ptr<CpuBarrier> cpu_barrier, std::size_t core_index); 45 std::shared_ptr<CpuBarrier> cpu_barrier, std::size_t core_index);
46 ~Cpu();
46 47
47 void RunLoop(bool tight_loop = true); 48 void RunLoop(bool tight_loop = true);
48 49