Skip to main content

Module components

Module components 

Source
Expand description

Kernel component declarations : Strat9-OS boot orchestration.

Each function annotated with #[component::init_component] is registered in the .component_entries linker section. component::init_all() reads that section at runtime, topologically sorts the entries according to their depends_on edges (with priority as a tiebreaker), and calls them in order.

§Stages

StageWhen
bootstrapBefore SMP, early kernel init
kthreadAfter SMP, in kernel-thread context
processAfter first user process is created

§Syntax

#[component::init_component(bootstrap, priority = 1)]
fn vfs_init() -> Result<(), ComponentInitError> { … }

#[component::init_component(kthread, priority = 2, depends_on = vfs_init)]
fn fs_ext4_init() -> Result<(), ComponentInitError> { … }

#[component::init_component(kthread, priority = 3, depends_on = [vfs_init, ipc_init])]
fn silo_init() -> Result<(), ComponentInitError> { … }

Functions§

acpi_init 🔒
arch_init 🔒
capability_init 🔒
drivers_init 🔒
filesystem_init 🔒
ipc_init 🔒
logger_init 🔒
memory_init 🔒
namespace_init 🔒
network_init 🔒
process_init 🔒
silo_init 🔒
sync_init 🔒
syscall_init 🔒
vfs_init 🔒