Struct r3_kernel::System

source ·
pub struct System<Traits>(_);
Expand description

Wraps a provided trait type Traits to instantiate a kernel. This type implements the traits from r3_core::kernel::raw, making it usable as a kernel, if Traits implements some appropriate traits, which consequently make it implement KernelTraits.

Trait Implementations§

source§

impl<Traits> Clone for System<Traits>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Traits> Debug for System<Traits>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Traits: KernelStatic<System<Traits>>> DelegateKernelStatic<System<Traits>> for System<Traits>

Implement KernelStatic<System<Traits>> on System<Traits> if the same trait is implemented on Traits.

§

type Target = Traits

source§

impl<Traits: KernelTraits> KernelAdjustTime for System<Traits>

source§

impl<Traits: KernelTraits> KernelBase for System<Traits>

source§

fn raw_debug() -> Self::RawDebugPrinter

Get an object that implements Debug for dumping the current kernel state.

Note that printing this object might consume a large amount of stack space.

source§

const RAW_SUPPORTED_QUEUE_ORDERS: &'static [Option<QueueOrderKind>] = _

source§

fn raw_acquire_cpu_lock() -> Result<(), CpuLockError>

source§

unsafe fn raw_release_cpu_lock() -> Result<(), CpuLockError>

source§

fn raw_has_cpu_lock() -> bool

Return a flag indicating whether CPU Lock is currently active.
source§

unsafe fn raw_unboost_priority() -> Result<(), BoostPriorityError>

source§

fn raw_is_priority_boost_active() -> bool

source§

fn raw_is_task_context() -> bool

source§

fn raw_is_interrupt_context() -> bool

source§

fn raw_is_boot_complete() -> bool

source§

fn raw_set_time(time: Time) -> Result<(), TimeError>

Implements Kernel::set_time.
source§

unsafe fn raw_exit_task() -> Result<!, ExitTaskError>

source§

fn raw_park() -> Result<(), ParkError>

Implements Kernel::park.
source§

fn raw_park_timeout(timeout: Duration) -> Result<(), ParkTimeoutError>

source§

fn raw_sleep(timeout: Duration) -> Result<(), SleepError>

Implements Kernel::sleep.
§

type RawDebugPrinter = KernelDebugPrinter<Traits>

§

type RawTaskId = NonZeroUsize

The type to identify tasks.
source§

fn raw_task_current() -> Result<Self::RawTaskId, GetCurrentTaskError>

Get the current task.
source§

unsafe fn raw_task_activate( this: Self::RawTaskId ) -> Result<(), ActivateTaskError>

source§

unsafe fn raw_task_interrupt( this: Self::RawTaskId ) -> Result<(), InterruptTaskError>

source§

unsafe fn raw_task_unpark_exact( this: Self::RawTaskId ) -> Result<(), UnparkExactError>

source§

unsafe fn raw_task_priority( this: Self::RawTaskId ) -> Result<usize, GetTaskPriorityError>

source§

unsafe fn raw_task_effective_priority( this: Self::RawTaskId ) -> Result<usize, GetTaskPriorityError>

source§

impl<Traits: KernelTraits> KernelBoostPriority for System<Traits>

Available on crate feature priority_boost only.
source§

impl<Traits: KernelTraits> KernelEventGroup for System<Traits>

source§

impl<Traits: KernelTraits> KernelInterruptLine for System<Traits>

source§

impl<Traits: KernelTraits> KernelMutex for System<Traits>

source§

impl<Traits: KernelTraits> KernelSemaphore for System<Traits>

source§

impl<Traits: KernelTraits> KernelTaskSetPriority for System<Traits>

source§

impl<Traits: KernelTraits> KernelTime for System<Traits>

Available on crate feature system_time only.
source§

impl<Traits: KernelTraits> KernelTimer for System<Traits>

source§

impl<Traits> Copy for System<Traits>

Auto Trait Implementations§

§

impl<Traits> RefUnwindSafe for System<Traits>where Traits: RefUnwindSafe,

§

impl<Traits> Send for System<Traits>where Traits: Send,

§

impl<Traits> Sync for System<Traits>where Traits: Sync,

§

impl<Traits> Unpin for System<Traits>where Traits: Unpin,

§

impl<Traits> UnwindSafe for System<Traits>where Traits: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, System> CfgPhase1<System> for Twhere T: DelegateKernelStatic<System>, <T as DelegateKernelStatic<System>>::Target: CfgPhase1<System>,

source§

const CFG_STARTUP_HOOKS: &'static [StartupHookAttr] = <T::Target>::CFG_STARTUP_HOOKS

source§

const CFG_INTERRUPT_HANDLERS: &'static [Option<unsafe extern "C" fn()>] = <T::Target>::CFG_INTERRUPT_HANDLERS

source§

fn cfg_hunk_pool_ptr() -> *mut u8

source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Kernel for Twhere T: KernelBase,

§

type DebugPrinter = <T as KernelBase>::RawDebugPrinter

source§

fn debug() -> <T as Kernel>::DebugPrinter

Get an object that implements Debug for dumping the current kernel state. Read more
source§

fn acquire_cpu_lock() -> Result<(), CpuLockError>

source§

unsafe fn release_cpu_lock() -> Result<(), CpuLockError>

Deactivate CPU Lock. Read more
source§

fn has_cpu_lock() -> bool

Return a flag indicating whether CPU Lock is currently active.
source§

fn boost_priority() -> Result<(), BoostPriorityError>where T: KernelBoostPriority,

source§

unsafe fn unboost_priority() -> Result<(), BoostPriorityError>

source§

fn is_priority_boost_active() -> bool

Return a flag indicating whether Priority Boost is currently active.
source§

fn is_task_context() -> bool

Return a flag indicating whether the calling context is a task context. Read more
source§

fn is_interrupt_context() -> bool

Return a flag indicating whether the calling context is an interrupt context. Read more
source§

fn is_boot_complete() -> bool

Return a flag indicating whether the boot phase is complete, i.e., all startup hooks completed execution, and the kernel started scheduling tasks and taking interrupts.
source§

fn set_time(time: Time) -> Result<(), TimeError>

Set the current system time. Read more
source§

fn time() -> Result<Time, TimeError>where T: KernelTime,

Get the current system time. Read more
source§

fn time_user_headroom() -> Durationwhere T: KernelAdjustTime,

The extent of how overdue a timed event can be made or how far a timed event can be delayed past Duration::MAX by a call to adjust_time. Read more
source§

fn adjust_time(delta: Duration) -> Result<(), AdjustTimeError>where T: KernelAdjustTime,

Move the current system time forward or backward by the specified amount. Read more
source§

unsafe fn exit_task() -> Result<!, ExitTaskError>

Terminate the current task, putting it into the Dormant state. Read more
source§

fn park() -> Result<(), ParkError>

Put the current task into the Waiting state until the task’s token is made available by Task::unpark. The token is initially absent when the task is activated. Read more
source§

fn park_timeout(timeout: Duration) -> Result<(), ParkTimeoutError>

park with timeout. Read more
source§

fn sleep(duration: Duration) -> Result<(), SleepError>

Block the current task for the specified duration.
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T, System> CfgPhase2<System> for Twhere T: DelegateKernelStatic<System>, <T as DelegateKernelStatic<System>>::Target: CfgPhase2<System>,

source§

impl<T, System> KernelStatic<System> for Twhere T: DelegateKernelStatic<System>, <T as DelegateKernelStatic<System>>::Target: KernelStatic<System>,