MCPcopy Create free account
hub / github.com/YatSenOS/YatSenOS-Tutorial-Volume-1 / first_thread

Function first_thread

lab6/src/3/src/kernel/setup.cpp:49–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void first_thread(void *arg)
50{
51 // 第1个线程不可以返回
52 stdio.moveCursor(0);
53 for (int i = 0; i < 25 * 80; ++i)
54 {
55 stdio.print(' ');
56 }
57 stdio.moveCursor(0);
58
59 cheese_burger = 0;
60 semaphore.initialize(1);
61
62 programManager.executeThread(a_mother, nullptr, "second thread", 1);
63 programManager.executeThread(a_naughty_boy, nullptr, "third thread", 1);
64
65 asm_halt();
66}
67
68extern "C" void setup_kernel()
69{

Callers

nothing calls this directly

Calls 4

moveCursorMethod · 0.45
printMethod · 0.45
initializeMethod · 0.45
executeThreadMethod · 0.45

Tested by

no test coverage detected