Merge pull request #1341 from lioncash/dependency

core/core_cpu: Replace exclusive monitor include with forward declaration
This commit is contained in:
bunnei 2018-09-18 22:13:05 -04:00 committed by GitHub
commit bf957d5345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -9,6 +9,7 @@
#ifdef ARCHITECTURE_x86_64 #ifdef ARCHITECTURE_x86_64
#include "core/arm/dynarmic/arm_dynarmic.h" #include "core/arm/dynarmic/arm_dynarmic.h"
#endif #endif
#include "core/arm/exclusive_monitor.h"
#include "core/arm/unicorn/arm_unicorn.h" #include "core/arm/unicorn/arm_unicorn.h"
#include "core/core_cpu.h" #include "core/core_cpu.h"
#include "core/core_timing.h" #include "core/core_timing.h"
@ -66,6 +67,8 @@ Cpu::Cpu(std::shared_ptr<ExclusiveMonitor> exclusive_monitor,
scheduler = std::make_shared<Kernel::Scheduler>(arm_interface.get()); scheduler = std::make_shared<Kernel::Scheduler>(arm_interface.get());
} }
Cpu::~Cpu() = default;
std::shared_ptr<ExclusiveMonitor> Cpu::MakeExclusiveMonitor(std::size_t num_cores) { std::shared_ptr<ExclusiveMonitor> Cpu::MakeExclusiveMonitor(std::size_t num_cores) {
if (Settings::values.use_cpu_jit) { if (Settings::values.use_cpu_jit) {
#ifdef ARCHITECTURE_x86_64 #ifdef ARCHITECTURE_x86_64

View File

@ -6,11 +6,10 @@
#include <atomic> #include <atomic>
#include <condition_variable> #include <condition_variable>
#include <cstddef>
#include <memory> #include <memory>
#include <mutex> #include <mutex>
#include <string>
#include "common/common_types.h" #include "common/common_types.h"
#include "core/arm/exclusive_monitor.h"
namespace Kernel { namespace Kernel {
class Scheduler; class Scheduler;
@ -19,6 +18,7 @@ class Scheduler;
namespace Core { namespace Core {
class ARM_Interface; class ARM_Interface;
class ExclusiveMonitor;
constexpr unsigned NUM_CPU_CORES{4}; constexpr unsigned NUM_CPU_CORES{4};
@ -43,6 +43,7 @@ class Cpu {
public: public:
Cpu(std::shared_ptr<ExclusiveMonitor> exclusive_monitor, Cpu(std::shared_ptr<ExclusiveMonitor> exclusive_monitor,
std::shared_ptr<CpuBarrier> cpu_barrier, std::size_t core_index); std::shared_ptr<CpuBarrier> cpu_barrier, std::size_t core_index);
~Cpu();
void RunLoop(bool tight_loop = true); void RunLoop(bool tight_loop = true);