Function kernel::process::load_processes

source ยท
pub fn load_processes<C: Chip>(
    kernel: &'static Kernel,
    chip: &'static C,
    app_flash: &'static [u8],
    app_memory: &'static mut [u8],
    procs: &'static mut [Option<&'static dyn Process>],
    fault_policy: &'static dyn ProcessFaultPolicy,
    _capability_management: &dyn ProcessManagementCapability,
) -> Result<(), ProcessLoadError>
Expand description

Load processes (stored as TBF objects in flash) into runnable process structures stored in the procs array and mark all successfully loaded processes as runnable. This method does not check the cryptographic credentials of TBF objects. Platforms for which code size is tight and do not need to check TBF credentials can call this method because it results in a smaller kernel, as it does not invoke the credential checking state machine.

This function is made pub so that board files can use it, but loading processes from slices of flash an memory is fundamentally unsafe. Therefore, we require the ProcessManagementCapability to call this function.