forked from xamidev/pepperOS
Function comments (v1)
This commit is contained in:
25
src/kmain.c
25
src/kmain.c
@@ -30,13 +30,25 @@
|
||||
__attribute__((used, section(".limine_requests")))
|
||||
volatile LIMINE_BASE_REVISION(3);
|
||||
|
||||
// Halt and catch fire (makes machine stall)
|
||||
/*
|
||||
* hcf - Halt and catch fire
|
||||
*
|
||||
* This function is called only in the case of an unrecoverable
|
||||
* error. It halts interrupts, and stops execution. The machine
|
||||
* will stay in an infinite loop state.
|
||||
*/
|
||||
void hcf()
|
||||
{
|
||||
CLEAR_INTERRUPTS; for (;;)asm("hlt");
|
||||
}
|
||||
|
||||
// Doing nothing (can be interrupted)
|
||||
/*
|
||||
* idle - Make the machine idle
|
||||
*
|
||||
* When there is nothing else to do, this function
|
||||
* gets called. It can be interrupted, so it allows
|
||||
* the scheduler, timer, and keyboard to work.
|
||||
*/
|
||||
void idle() {SET_INTERRUPTS; for(;;)asm("hlt");}
|
||||
|
||||
struct flanterm_context *ft_ctx;
|
||||
@@ -72,7 +84,14 @@ void idle_main(void* arg)
|
||||
|
||||
extern uintptr_t kheap_start;
|
||||
|
||||
// This is our entry point
|
||||
/*
|
||||
* kmain - Kernel entry point
|
||||
*
|
||||
* This is where execution begins at handoff from Limine.
|
||||
* The function fetches all needed information from the
|
||||
* bootloader, initializes all kernel modules and structures,
|
||||
* and then goes in an idle state.
|
||||
*/
|
||||
void kmain()
|
||||
{
|
||||
CLEAR_INTERRUPTS;
|
||||
|
||||
Reference in New Issue
Block a user