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

Function _start

src/main.cpp:40–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38std::atomic_flag primary_booted_ = ATOMIC_FLAG_INIT;
39
40auto _start(int argc, const char** argv) -> void {
41 if (!primary_booted_.test_and_set(std::memory_order_acquire)) {
42 CppInit();
43 main(argc, argv);
44 } else {
45 main_smp(argc, argv);
46 }
47
48 while (true) {
49 cpu_io::Pause();
50 }
51}
52
53auto main(int argc, const char** argv) -> int {
54 // 初始化当前核心的 per_cpu 数据

Callers

nothing calls this directly

Calls 4

CppInitFunction · 0.85
PauseFunction · 0.85
mainFunction · 0.70
main_smpFunction · 0.70

Tested by

no test coverage detected