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

Function main_smp

src/main.cpp:19–34  ·  view source on GitHub ↗

非启动核入口

Source from the content-addressed store, hash-verified

17
18/// 非启动核入口
19auto main_smp(int argc, const char** argv) -> int {
20 per_cpu::GetCurrentCore() = per_cpu::PerCpu(cpu_io::GetCurrentCoreId());
21 ArchInitSMP(argc, argv);
22 MemoryInitSMP();
23 InterruptInitSMP(argc, argv);
24 TaskManagerSingleton::instance().InitCurrentCore();
25 TimerInitSMP();
26
27 klog::Info("Hello SimpleKernel SMP");
28
29 // 启动调度器
30 TaskManagerSingleton::instance().Schedule();
31
32 // UNREACHABLE: Schedule() 不应返回
33 __builtin_unreachable();
34}
35
36} // namespace
37

Callers 1

_startFunction · 0.70

Calls 10

GetCurrentCoreFunction · 0.85
PerCpuClass · 0.85
GetCurrentCoreIdFunction · 0.85
MemoryInitSMPFunction · 0.85
InfoFunction · 0.85
ScheduleMethod · 0.80
ArchInitSMPFunction · 0.50
InterruptInitSMPFunction · 0.50
TimerInitSMPFunction · 0.50
InitCurrentCoreMethod · 0.45

Tested by

no test coverage detected