Function comments (v1)

This commit is contained in:
2026-03-13 12:51:29 +01:00
parent 8e2a612d88
commit 8026c33639
25 changed files with 560 additions and 48 deletions

View File

@@ -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;