aboutsummaryrefslogtreecommitdiff
path: root/src/core/core_cpu.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-05-02 22:36:51 -0400
committerbunnei <bunneidev@gmail.com>2018-05-10 19:34:46 -0400
commita434fdcb102e96ddf564dc0973d7073d49bf19fc (patch)
treede758b0cc5ebcb67146397a74474fb898c0be51a /src/core/core_cpu.h
parent9776ff91797423a9cf19571faafe4648fb5a1d1d (diff)
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 e6ed698ccf..06784c4ab2 100644
--- a/src/core/core_cpu.h
+++ b/src/core/core_cpu.h
@@ -51,12 +51,16 @@ public:
void PrepareReschedule();
- ARM_Interface& CPU() {
+ ARM_Interface& ArmInterface() {
return *arm_interface;
}
- Kernel::Scheduler& Scheduler() {
- return *scheduler;
+ const ARM_Interface& ArmInterface() const {
+ return *arm_interface;
+ }
+
+ const std::shared_ptr<Kernel::Scheduler>& Scheduler() const {
+ return scheduler;
}
bool IsMainCore() const {
@@ -68,7 +72,7 @@ private:
std::shared_ptr<ARM_Interface> arm_interface;
std::shared_ptr<CpuBarrier> cpu_barrier;
- std::unique_ptr<Kernel::Scheduler> scheduler;
+ std::shared_ptr<Kernel::Scheduler> scheduler;
bool reschedule_pending{};
size_t core_index;