MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / GetCurrentCore

Function GetCurrentCore

src/include/per_cpu.hpp:55–57  ·  view source on GitHub ↗

@brief 获取当前核心的 PerCpu 数据

Source from the content-addressed store, hash-verified

53
54/// @brief 获取当前核心的 PerCpu 数据
55static __always_inline auto GetCurrentCore() -> PerCpu& {
56 return PerCpuArraySingleton::instance()[cpu_io::GetCurrentCoreId()];
57}
58
59} // namespace per_cpu

Callers 12

main_smpFunction · 0.85
mainFunction · 0.85
InitCurrentCoreMethod · 0.85
AddTaskMethod · 0.85
ScheduleMethod · 0.85
GetCurrentTaskMethod · 0.85
test_tick_incrementsFunction · 0.85
test_sleep_timingFunction · 0.85
test_runtime_trackingFunction · 0.85
main_smpFunction · 0.85
mainFunction · 0.85
switch_toFunction · 0.85

Calls 1

GetCurrentCoreIdFunction · 0.85

Tested by 3

test_tick_incrementsFunction · 0.68
test_sleep_timingFunction · 0.68
test_runtime_trackingFunction · 0.68