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_cpu.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/core/core_cpu.h') diff --git a/src/core/core_cpu.h b/src/core/core_cpu.h index 243f0b5e7..976952903 100644 --- a/src/core/core_cpu.h +++ b/src/core/core_cpu.h @@ -10,6 +10,7 @@ #include #include #include "common/common_types.h" +#include "core/arm/exclusive_monitor.h" class ARM_Interface; @@ -40,7 +41,8 @@ private: class Cpu { public: - Cpu(std::shared_ptr cpu_barrier, size_t core_index); + Cpu(std::shared_ptr exclusive_monitor, + std::shared_ptr cpu_barrier, size_t core_index); void RunLoop(bool tight_loop = true); @@ -64,6 +66,12 @@ public: return core_index == 0; } + size_t CoreIndex() const { + return core_index; + } + + static std::shared_ptr MakeExclusiveMonitor(size_t num_cores); + private: void Reschedule(); -- cgit v1.2.3