aboutsummaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-08-25 20:59:28 -0700
committerGitHub <noreply@github.com>2021-08-25 20:59:28 -0700
commit0c8594b2251cf600afc3a89ecf1114eb3a25f700 (patch)
treed6f7d065cd8e2f00c85b9749076ef303a705c864 /src/core/core.cpp
parent3843995ceb3e20c1d32d790f1d81a2a6c3d49c38 (diff)
Revert "kernel: Various improvements to scheduler"
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 5893a86bf0..ba4629993d 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -507,6 +507,12 @@ const ARM_Interface& System::CurrentArmInterface() const {
return impl->kernel.CurrentPhysicalCore().ArmInterface();
}
+std::size_t System::CurrentCoreIndex() const {
+ std::size_t core = impl->kernel.GetCurrentHostThreadID();
+ ASSERT(core < Core::Hardware::NUM_CPU_CORES);
+ return core;
+}
+
Kernel::PhysicalCore& System::CurrentPhysicalCore() {
return impl->kernel.CurrentPhysicalCore();
}