Kernel: Add an explanatory comment to the end of _start()
This commit is contained in:
parent
1ea216dfd1
commit
60bd8d9418
@ -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.
|
||||
}
|
Loading…
Reference in New Issue
Block a user