[][src]Struct kernel::Kernel

pub struct Kernel { /* fields omitted */ }

Main object for the kernel. Each board will need to create one.

Implementations

impl Kernel[src]

pub fn new(processes: &'static [Option<&'static dyn ProcessType>]) -> Kernel[src]

pub fn process_each_capability<F>(
    &'static self,
    _capability: &dyn ProcessManagementCapability,
    closure: F
) where
    F: Fn(&dyn ProcessType), 
[src]

Run a closure on every valid process. This will iterate the array of processes and call the closure on every process that exists.

This is functionally the same as process_each(), but this method is available outside the kernel crate and requires a ProcessManagementCapability to use.

pub fn create_grant<T: Default>(
    &'static self,
    _capability: &dyn MemoryAllocationCapability
) -> Grant<T>
[src]

Create a new grant. This is used in board initialization to setup grants that capsules use to interact with processes.

Grants must only be created before processes are initialized. Processes use the number of grants that have been allocated to correctly initialize the process's memory with a pointer for each grant. If a grant is created after processes are initialized this will panic.

Calling this function is restricted to only certain users, and to enforce this calling this function requires the MemoryAllocationCapability capability.

pub fn hardfault_all_apps<C: ProcessManagementCapability>(&self, _c: &C)[src]

Cause all apps to fault.

This will call set_fault_state() on each app, causing the app to enter the state as if it had crashed (for example with an MPU violation). If the process is configured to be restarted it will be.

Only callers with the ProcessManagementCapability can call this function. This restricts general capsules from being able to call this function, since capsules should not be able to arbitrarily restart all apps.

pub fn kernel_loop<P: Platform, C: Chip>(
    &'static self,
    platform: &P,
    chip: &C,
    ipc: Option<&IPC>,
    _capability: &dyn MainLoopCapability
)
[src]

Main loop.

Auto Trait Implementations

impl !Send for Kernel

impl !Sync for Kernel

impl Unpin for Kernel

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.