PatchworkOS
c9fea19
A non-POSIX operating system.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
init.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
kernel/cpu/cpu.h
>
4
5
/**
6
* @brief Initialization and `kmain()`.
7
* @defgroup kernel_init Initialization
8
* @ingroup kernel
9
*
10
* @{
11
*/
12
13
/**
14
* @brief Early kernel initialization.
15
*
16
* This will do the absolute minimum to get the scheduler running.
17
*
18
* Having the scheduler running lets us load the boot thread which will jump to `kmain()` where we can do the rest
19
* of the kernel initialization.
20
*
21
* Will be called in the `_start()` function found in `start.s` with interrupts disabled.
22
*/
23
_NORETURN
void
init_early
(
void
);
24
25
/**
26
* @brief Kernel main function.
27
*
28
* This is the entry point for the boot thread. When `init_early()` jumps to the boot thread we will end up here. We
29
* then perform the rest of the kernel initialization here and start the init process.
30
*
31
* Will never return, the boot thread will exit itself when done.
32
*/
33
_NORETURN
void
kmain
(
void
);
34
35
/** @} */
cpu.h
init_early
_NORETURN void init_early(void)
Early kernel initialization.
Definition
init.c:39
kmain
_NORETURN void kmain(void)
Kernel main function.
Definition
init.c:183
_NORETURN
#define _NORETURN
Definition
config.h:28
include
kernel
init
init.h
Generated on Mon Dec 15 2025 05:10:34 for PatchworkOS by
1.9.8