summaryrefslogtreecommitdiff
path: root/src/core/core_cpu.h
diff options
context:
space:
mode:
authorGravatar MerryMage2018-07-03 14:28:46 +0100
committerGravatar MerryMage2018-07-22 15:55:17 +0100
commit0b1c2e5505c6478ef10e65c0b002eeb242e15540 (patch)
tree187eeabceb451d3cd89b3f0fd47412a7a9e57015 /src/core/core_cpu.h
parentMerge pull request #765 from lioncash/file (diff)
downloadyuzu-0b1c2e5505c6478ef10e65c0b002eeb242e15540.tar.gz
yuzu-0b1c2e5505c6478ef10e65c0b002eeb242e15540.tar.xz
yuzu-0b1c2e5505c6478ef10e65c0b002eeb242e15540.zip
Implement exclusive monitor
Diffstat (limited to 'src/core/core_cpu.h')
-rw-r--r--src/core/core_cpu.h10
1 files changed, 9 insertions, 1 deletions
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 @@
10#include <mutex> 10#include <mutex>
11#include <string> 11#include <string>
12#include "common/common_types.h" 12#include "common/common_types.h"
13#include "core/arm/exclusive_monitor.h"
13 14
14class ARM_Interface; 15class ARM_Interface;
15 16
@@ -40,7 +41,8 @@ private:
40 41
41class Cpu { 42class Cpu {
42public: 43public:
43 Cpu(std::shared_ptr<CpuBarrier> cpu_barrier, size_t core_index); 44 Cpu(std::shared_ptr<ExclusiveMonitor> exclusive_monitor,
45 std::shared_ptr<CpuBarrier> cpu_barrier, size_t core_index);
44 46
45 void RunLoop(bool tight_loop = true); 47 void RunLoop(bool tight_loop = true);
46 48
@@ -64,6 +66,12 @@ public:
64 return core_index == 0; 66 return core_index == 0;
65 } 67 }
66 68
69 size_t CoreIndex() const {
70 return core_index;
71 }
72
73 static std::shared_ptr<ExclusiveMonitor> MakeExclusiveMonitor(size_t num_cores);
74
67private: 75private:
68 void Reschedule(); 76 void Reschedule();
69 77