diff --git a/kernel/src/main.cpp b/kernel/src/main.cpp index da7024ef..7ff4b2aa 100644 --- a/kernel/src/main.cpp +++ b/kernel/src/main.cpp @@ -78,5 +78,10 @@ extern "C" void _start() Interrupts::enable(); - while (1) halt(); + while (1) + halt(); // As soon as the first timer interrupt arrives, this idle loop is gone, since the main function is not + // registered as a task and thus the scheduler will never schedule this again. We still have to do + // something while waiting for a timer interrupt to arrive, though. In fact, in most cases, calling + // halt() once would be enough, since that function halts the CPU until the next interrupt (most likely + // the timer one) arrives. But we have to guarantee this function never returns. } \ No newline at end of file