pub struct KState {
pub cpu: Cpu,
pub kprint: KPrint,
pub mm: Mm,
pub sched: Sched,
pub vfs: Vfs,
}Expand description
The central kernel state aggregate; one field per OS subsystem domain.
Fields§
§cpu: Cpu§kprint: KPrint§mm: Mm§sched: Sched§vfs: VfsImplementations§
Source§impl KState
impl KState
Sourcepub fn init(&self)
pub fn init(&self)
Calls the init method of all subsystems which have one
This method should be the very first call the kernel makes, as without it, a lot of
KSTATEwill be in an incorrect state for the boot process
Use this to initialize any non-zero default values; those aren’t initialized in the const fn new, as that would increase the binary size by the size of the entire KSTATE struct, which we don’t want