summaryrefslogtreecommitdiffstats
path: root/src/core/core.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 5893a86bf..ba4629993 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();
}