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
| Stage | When |
|---|---|
bootstrap | Before SMP, early kernel init |
kthread | After SMP, in kernel-thread context |
process | After 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> { … }