summaryrefslogtreecommitdiff
path: root/src/core/core_cpu.h
diff options
context:
space:
mode:
authorGravatar bunnei2018-05-02 22:36:51 -0400
committerGravatar bunnei2018-05-10 19:34:46 -0400
commita434fdcb102e96ddf564dc0973d7073d49bf19fc (patch)
treede758b0cc5ebcb67146397a74474fb898c0be51a /src/core/core_cpu.h
parentcore: Create a thread for each CPU core, keep in lock-step with a barrier. (diff)
downloadyuzu-a434fdcb102e96ddf564dc0973d7073d49bf19fc.tar.gz
yuzu-a434fdcb102e96ddf564dc0973d7073d49bf19fc.tar.xz
yuzu-a434fdcb102e96ddf564dc0973d7073d49bf19fc.zip
core: Implement multicore support.
Diffstat (limited to 'src/core/core_cpu.h')
-rw-r--r--src/core/core_cpu.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/core_cpu.h b/src/core/core_cpu.h
index e6ed698cc..06784c4ab 100644
--- a/src/core/core_cpu.h
+++ b/src/core/core_cpu.h
@@ -51,12 +51,16 @@ public:
51 51
52 void PrepareReschedule(); 52 void PrepareReschedule();
53 53
54 ARM_Interface& CPU() { 54 ARM_Interface& ArmInterface() {
55 return *arm_interface; 55 return *arm_interface;
56 } 56 }
57 57
58 Kernel::Scheduler& Scheduler() { 58 const ARM_Interface& ArmInterface() const {
59 return *scheduler; 59 return *arm_interface;
60 }
61
62 const std::shared_ptr<Kernel::Scheduler>& Scheduler() const {
63 return scheduler;
60 } 64 }
61 65
62 bool IsMainCore() const { 66 bool IsMainCore() const {
@@ -68,7 +72,7 @@ private:
68 72
69 std::shared_ptr<ARM_Interface> arm_interface; 73 std::shared_ptr<ARM_Interface> arm_interface;
70 std::shared_ptr<CpuBarrier> cpu_barrier; 74 std::shared_ptr<CpuBarrier> cpu_barrier;
71 std::unique_ptr<Kernel::Scheduler> scheduler; 75 std::shared_ptr<Kernel::Scheduler> scheduler;
72 76
73 bool reschedule_pending{}; 77 bool reschedule_pending{};
74 size_t core_index; 78 size_t core_index;