[][src]Trait r3::kernel::PortToKernel

pub trait PortToKernel {
    unsafe fn boot() -> !;
unsafe fn choose_running_task();
unsafe fn timer_tick(); }

Methods intended to be called by a port.

Safety

These are only meant to be called by the port.

Required methods

unsafe fn boot() -> !

Initialize runtime structures.

Should be called for exactly once by the port before calling into any user (application) or kernel code.

Precondition: CPU Lock active, Preboot phase

unsafe fn choose_running_task()

Determine the next task to run and store it in State::running_task_ptr.

Precondition: CPU Lock active / Postcondition: CPU Lock active

unsafe fn timer_tick()

Called by a port timer driver to “announce” new ticks.

This method can be called anytime, but the driver is expected to attempt to ensure the calls occur near tick boundaries. For an optimal operation, the driver should implement pend_tick_after and handle the calls made by the kernel to figure out the optimal moment to call timer_tick.

This method will call pend_tick or pend_tick_after.

Precondition: CPU Lock inactive, an interrupt context

Loading content...

Implementors

impl<System: Kernel> PortToKernel for System[src]

Loading content...