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: KernelStatic<System<Traits>>> DelegateKernelStatic<System<Traits>> for System<Traits>
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
.
source§impl<Traits: KernelTraits> KernelAdjustTime for System<Traits>
impl<Traits: KernelTraits> KernelAdjustTime for System<Traits>
source§const RAW_TIME_USER_HEADROOM: Duration = TIME_USER_HEADROOM
const RAW_TIME_USER_HEADROOM: Duration = TIME_USER_HEADROOM
Implements
Kernel::time_user_headroom
.source§fn raw_adjust_time(delta: Duration) -> Result<(), AdjustTimeError>
fn raw_adjust_time(delta: Duration) -> Result<(), AdjustTimeError>
Implements
Kernel::adjust_time
.source§impl<Traits: KernelTraits> KernelBase for System<Traits>
impl<Traits: KernelTraits> KernelBase for System<Traits>
source§fn raw_debug() -> Self::RawDebugPrinter
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>] = _
const RAW_SUPPORTED_QUEUE_ORDERS: &'static [Option<QueueOrderKind>] = _
Used by
QueueOrder::is_supported
. Read moresource§fn raw_acquire_cpu_lock() -> Result<(), CpuLockError>
fn raw_acquire_cpu_lock() -> Result<(), CpuLockError>
Implements
Kernel::acquire_cpu_lock
.source§unsafe fn raw_release_cpu_lock() -> Result<(), CpuLockError>
unsafe fn raw_release_cpu_lock() -> Result<(), CpuLockError>
Implements
Kernel::release_cpu_lock
. Read moresource§fn raw_has_cpu_lock() -> bool
fn raw_has_cpu_lock() -> bool
Return a flag indicating whether CPU Lock is currently active.
source§unsafe fn raw_unboost_priority() -> Result<(), BoostPriorityError>
unsafe fn raw_unboost_priority() -> Result<(), BoostPriorityError>
Implements
Kernel::unboost_priority
. Read moresource§fn raw_is_priority_boost_active() -> bool
fn raw_is_priority_boost_active() -> bool
Implements
Kernel::is_priority_boost_active
.source§fn raw_is_task_context() -> bool
fn raw_is_task_context() -> bool
Implements
Kernel::is_task_context
.source§fn raw_is_interrupt_context() -> bool
fn raw_is_interrupt_context() -> bool
Implements
Kernel::is_interrupt_context
.source§fn raw_is_boot_complete() -> bool
fn raw_is_boot_complete() -> bool
Implements
Kernel::is_boot_complete
.source§fn raw_set_time(time: Time) -> Result<(), TimeError>
fn raw_set_time(time: Time) -> Result<(), TimeError>
Implements
Kernel::set_time
.source§unsafe fn raw_exit_task() -> Result<!, ExitTaskError>
unsafe fn raw_exit_task() -> Result<!, ExitTaskError>
Implements
Kernel::exit_task
. Read moresource§fn raw_park_timeout(timeout: Duration) -> Result<(), ParkTimeoutError>
fn raw_park_timeout(timeout: Duration) -> Result<(), ParkTimeoutError>
Implements
Kernel::park_timeout
.source§fn raw_sleep(timeout: Duration) -> Result<(), SleepError>
fn raw_sleep(timeout: Duration) -> Result<(), SleepError>
Implements
Kernel::sleep
.type RawDebugPrinter = KernelDebugPrinter<Traits>
§type RawTaskId = NonZeroUsize
type RawTaskId = NonZeroUsize
The type to identify tasks.
source§fn raw_task_current() -> Result<Self::RawTaskId, GetCurrentTaskError>
fn raw_task_current() -> Result<Self::RawTaskId, GetCurrentTaskError>
Get the current task.
source§unsafe fn raw_task_activate(
this: Self::RawTaskId
) -> Result<(), ActivateTaskError>
unsafe fn raw_task_activate( this: Self::RawTaskId ) -> Result<(), ActivateTaskError>
Implements
Task::activate
. Read moresource§unsafe fn raw_task_interrupt(
this: Self::RawTaskId
) -> Result<(), InterruptTaskError>
unsafe fn raw_task_interrupt( this: Self::RawTaskId ) -> Result<(), InterruptTaskError>
Implements
Task::interrupt
. Read moresource§unsafe fn raw_task_unpark_exact(
this: Self::RawTaskId
) -> Result<(), UnparkExactError>
unsafe fn raw_task_unpark_exact( this: Self::RawTaskId ) -> Result<(), UnparkExactError>
Implements
Task::unpark_exact
. Read moresource§unsafe fn raw_task_priority(
this: Self::RawTaskId
) -> Result<usize, GetTaskPriorityError>
unsafe fn raw_task_priority( this: Self::RawTaskId ) -> Result<usize, GetTaskPriorityError>
Implements
Task::priority
. Read moresource§unsafe fn raw_task_effective_priority(
this: Self::RawTaskId
) -> Result<usize, GetTaskPriorityError>
unsafe fn raw_task_effective_priority( this: Self::RawTaskId ) -> Result<usize, GetTaskPriorityError>
Implements
Task::effective_priority
. Read moresource§impl<Traits: KernelTraits> KernelBoostPriority for System<Traits>
Available on crate feature priority_boost
only.
impl<Traits: KernelTraits> KernelBoostPriority for System<Traits>
Available on crate feature
priority_boost
only.source§fn raw_boost_priority() -> Result<(), BoostPriorityError>
fn raw_boost_priority() -> Result<(), BoostPriorityError>
Implements
Kernel::boost_priority
.source§impl<Traits: KernelTraits> KernelEventGroup for System<Traits>
impl<Traits: KernelTraits> KernelEventGroup for System<Traits>
§type RawEventGroupId = NonZeroUsize
type RawEventGroupId = NonZeroUsize
The type to identify event groups.
source§unsafe fn raw_event_group_set(
this: Id,
bits: EventGroupBits
) -> Result<(), UpdateEventGroupError>
unsafe fn raw_event_group_set( this: Id, bits: EventGroupBits ) -> Result<(), UpdateEventGroupError>
Implements
EventGroup::set
. Read moresource§unsafe fn raw_event_group_clear(
this: Id,
bits: EventGroupBits
) -> Result<(), UpdateEventGroupError>
unsafe fn raw_event_group_clear( this: Id, bits: EventGroupBits ) -> Result<(), UpdateEventGroupError>
Implements
EventGroup::clear
. Read moresource§unsafe fn raw_event_group_get(
this: Id
) -> Result<EventGroupBits, GetEventGroupError>
unsafe fn raw_event_group_get( this: Id ) -> Result<EventGroupBits, GetEventGroupError>
Implements
EventGroup::get
. Read moresource§unsafe fn raw_event_group_wait(
this: Id,
bits: EventGroupBits,
flags: EventGroupWaitFlags
) -> Result<EventGroupBits, WaitEventGroupError>
unsafe fn raw_event_group_wait( this: Id, bits: EventGroupBits, flags: EventGroupWaitFlags ) -> Result<EventGroupBits, WaitEventGroupError>
Implements
EventGroup::wait
. Read moresource§unsafe fn raw_event_group_wait_timeout(
this: Id,
bits: EventGroupBits,
flags: EventGroupWaitFlags,
timeout: Duration
) -> Result<EventGroupBits, WaitEventGroupTimeoutError>
unsafe fn raw_event_group_wait_timeout( this: Id, bits: EventGroupBits, flags: EventGroupWaitFlags, timeout: Duration ) -> Result<EventGroupBits, WaitEventGroupTimeoutError>
Implements
EventGroup::wait_timeout
. Read moresource§unsafe fn raw_event_group_poll(
this: Id,
bits: EventGroupBits,
flags: EventGroupWaitFlags
) -> Result<EventGroupBits, PollEventGroupError>
unsafe fn raw_event_group_poll( this: Id, bits: EventGroupBits, flags: EventGroupWaitFlags ) -> Result<EventGroupBits, PollEventGroupError>
Implements
EventGroup::poll
. Read moresource§impl<Traits: KernelTraits> KernelInterruptLine for System<Traits>
impl<Traits: KernelTraits> KernelInterruptLine for System<Traits>
source§const RAW_MANAGED_INTERRUPT_PRIORITY_RANGE: Range<InterruptPriority> = <Traits as PortInterrupts>::MANAGED_INTERRUPT_PRIORITY_RANGE
const RAW_MANAGED_INTERRUPT_PRIORITY_RANGE: Range<InterruptPriority> = <Traits as PortInterrupts>::MANAGED_INTERRUPT_PRIORITY_RANGE
source§const RAW_MANAGED_INTERRUPT_LINES: &'static [InterruptNum] = <Traits as PortInterrupts>::MANAGED_INTERRUPT_LINES
const RAW_MANAGED_INTERRUPT_LINES: &'static [InterruptNum] = <Traits as PortInterrupts>::MANAGED_INTERRUPT_LINES
source§unsafe fn raw_interrupt_line_set_priority(
this: InterruptNum,
value: InterruptPriority
) -> Result<(), SetInterruptLinePriorityError>
unsafe fn raw_interrupt_line_set_priority( this: InterruptNum, value: InterruptPriority ) -> Result<(), SetInterruptLinePriorityError>
Implements
InterruptLine::set_priority
. Read moresource§unsafe fn raw_interrupt_line_enable(
this: InterruptNum
) -> Result<(), EnableInterruptLineError>
unsafe fn raw_interrupt_line_enable( this: InterruptNum ) -> Result<(), EnableInterruptLineError>
Implements
InterruptLine::enable
. Read moresource§unsafe fn raw_interrupt_line_disable(
this: InterruptNum
) -> Result<(), EnableInterruptLineError>
unsafe fn raw_interrupt_line_disable( this: InterruptNum ) -> Result<(), EnableInterruptLineError>
Implements
InterruptLine::disable
. Read moresource§unsafe fn raw_interrupt_line_pend(
this: InterruptNum
) -> Result<(), PendInterruptLineError>
unsafe fn raw_interrupt_line_pend( this: InterruptNum ) -> Result<(), PendInterruptLineError>
Implements
InterruptLine::pend
. Read moresource§unsafe fn raw_interrupt_line_clear(
this: InterruptNum
) -> Result<(), ClearInterruptLineError>
unsafe fn raw_interrupt_line_clear( this: InterruptNum ) -> Result<(), ClearInterruptLineError>
Implements
InterruptLine::clear
. Read moresource§unsafe fn raw_interrupt_line_is_pending(
this: InterruptNum
) -> Result<bool, QueryInterruptLineError>
unsafe fn raw_interrupt_line_is_pending( this: InterruptNum ) -> Result<bool, QueryInterruptLineError>
Implements
InterruptLine::is_pending
. Read moresource§impl<Traits: KernelTraits> KernelMutex for System<Traits>
impl<Traits: KernelTraits> KernelMutex for System<Traits>
§type RawMutexId = NonZeroUsize
type RawMutexId = NonZeroUsize
The type to identify mutexes.
source§const RAW_SUPPORTED_MUTEX_PROTOCOLS: &'static [Option<MutexProtocolKind>] = _
const RAW_SUPPORTED_MUTEX_PROTOCOLS: &'static [Option<MutexProtocolKind>] = _
Used by
MutexProtocol::is_supported
. Read moresource§unsafe fn raw_mutex_is_locked(this: Id) -> Result<bool, QueryMutexError>
unsafe fn raw_mutex_is_locked(this: Id) -> Result<bool, QueryMutexError>
Implements
Mutex::is_locked
. Read moresource§unsafe fn raw_mutex_unlock(this: Id) -> Result<(), UnlockMutexError>
unsafe fn raw_mutex_unlock(this: Id) -> Result<(), UnlockMutexError>
Implements
Mutex::unlock
. Read moresource§unsafe fn raw_mutex_lock(this: Id) -> Result<(), LockMutexError>
unsafe fn raw_mutex_lock(this: Id) -> Result<(), LockMutexError>
Implements
Mutex::lock
. Read moresource§unsafe fn raw_mutex_lock_timeout(
this: Id,
timeout: Duration
) -> Result<(), LockMutexTimeoutError>
unsafe fn raw_mutex_lock_timeout( this: Id, timeout: Duration ) -> Result<(), LockMutexTimeoutError>
Implements
Mutex::lock_timeout
. Read moresource§unsafe fn raw_mutex_try_lock(this: Id) -> Result<(), TryLockMutexError>
unsafe fn raw_mutex_try_lock(this: Id) -> Result<(), TryLockMutexError>
Implements
Mutex::try_lock
. Read moresource§unsafe fn raw_mutex_mark_consistent(
this: Id
) -> Result<(), MarkConsistentMutexError>
unsafe fn raw_mutex_mark_consistent( this: Id ) -> Result<(), MarkConsistentMutexError>
Implements
Mutex::mark_consistent
. Read moresource§impl<Traits: KernelTraits> KernelSemaphore for System<Traits>
impl<Traits: KernelTraits> KernelSemaphore for System<Traits>
§type RawSemaphoreId = NonZeroUsize
type RawSemaphoreId = NonZeroUsize
The type to identify semaphores.
source§unsafe fn raw_semaphore_drain(this: Id) -> Result<(), DrainSemaphoreError>
unsafe fn raw_semaphore_drain(this: Id) -> Result<(), DrainSemaphoreError>
Implements
Semaphore::drain
. Read moresource§unsafe fn raw_semaphore_get(
this: Id
) -> Result<SemaphoreValue, GetSemaphoreError>
unsafe fn raw_semaphore_get( this: Id ) -> Result<SemaphoreValue, GetSemaphoreError>
Implements
Semaphore::get
. Read moresource§unsafe fn raw_semaphore_signal(
this: Id,
count: SemaphoreValue
) -> Result<(), SignalSemaphoreError>
unsafe fn raw_semaphore_signal( this: Id, count: SemaphoreValue ) -> Result<(), SignalSemaphoreError>
Implements
Semaphore::signal
. Read moresource§unsafe fn raw_semaphore_signal_one(this: Id) -> Result<(), SignalSemaphoreError>
unsafe fn raw_semaphore_signal_one(this: Id) -> Result<(), SignalSemaphoreError>
Implements
Semaphore::signal_one
. Read moresource§unsafe fn raw_semaphore_wait_one(this: Id) -> Result<(), WaitSemaphoreError>
unsafe fn raw_semaphore_wait_one(this: Id) -> Result<(), WaitSemaphoreError>
Implements
Semaphore::wait_one
. Read moresource§unsafe fn raw_semaphore_wait_one_timeout(
this: Id,
timeout: Duration
) -> Result<(), WaitSemaphoreTimeoutError>
unsafe fn raw_semaphore_wait_one_timeout( this: Id, timeout: Duration ) -> Result<(), WaitSemaphoreTimeoutError>
Implements
Semaphore::wait_one_timeout
. Read moresource§unsafe fn raw_semaphore_poll_one(this: Id) -> Result<(), PollSemaphoreError>
unsafe fn raw_semaphore_poll_one(this: Id) -> Result<(), PollSemaphoreError>
Implements
Semaphore::poll_one
. Read moresource§impl<Traits: KernelTraits> KernelTaskSetPriority for System<Traits>
impl<Traits: KernelTraits> KernelTaskSetPriority for System<Traits>
source§unsafe fn raw_task_set_priority(
this: Self::RawTaskId,
priority: usize
) -> Result<(), SetTaskPriorityError>
unsafe fn raw_task_set_priority( this: Self::RawTaskId, priority: usize ) -> Result<(), SetTaskPriorityError>
Implements
Task::set_priority
. Read moresource§impl<Traits: KernelTraits> KernelTime for System<Traits>
Available on crate feature system_time
only.
impl<Traits: KernelTraits> KernelTime for System<Traits>
Available on crate feature
system_time
only.source§impl<Traits: KernelTraits> KernelTimer for System<Traits>
impl<Traits: KernelTraits> KernelTimer for System<Traits>
§type RawTimerId = NonZeroUsize
type RawTimerId = NonZeroUsize
The type to identify timers.
source§unsafe fn raw_timer_start(this: Id) -> Result<(), StartTimerError>
unsafe fn raw_timer_start(this: Id) -> Result<(), StartTimerError>
Implements
Timer::start
. Read moresource§unsafe fn raw_timer_stop(this: Id) -> Result<(), StopTimerError>
unsafe fn raw_timer_stop(this: Id) -> Result<(), StopTimerError>
Implements
Timer::stop
. Read moresource§unsafe fn raw_timer_set_delay(
this: Id,
delay: Option<Duration>
) -> Result<(), SetTimerDelayError>
unsafe fn raw_timer_set_delay( this: Id, delay: Option<Duration> ) -> Result<(), SetTimerDelayError>
Implements
Timer::set_delay
. Read moresource§unsafe fn raw_timer_set_period(
this: Id,
period: Option<Duration>
) -> Result<(), SetTimerPeriodError>
unsafe fn raw_timer_set_period( this: Id, period: Option<Duration> ) -> Result<(), SetTimerPeriodError>
Implements
Timer::set_period
. Read moreimpl<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, System> CfgPhase1<System> for Twhere
T: DelegateKernelStatic<System>,
<T as DelegateKernelStatic<System>>::Target: CfgPhase1<System>,
impl<T, System> CfgPhase1<System> for Twhere T: DelegateKernelStatic<System>, <T as DelegateKernelStatic<System>>::Target: CfgPhase1<System>,
const CFG_STARTUP_HOOKS: &'static [StartupHookAttr] = <T::Target>::CFG_STARTUP_HOOKS
const CFG_INTERRUPT_HANDLERS: &'static [Option<unsafe extern "C" fn()>] = <T::Target>::CFG_INTERRUPT_HANDLERS
fn cfg_hunk_pool_ptr() -> *mut u8
source§impl<T> Kernel for Twhere
T: KernelBase,
impl<T> Kernel for Twhere T: KernelBase,
type DebugPrinter = <T as KernelBase>::RawDebugPrinter
source§fn debug() -> <T as Kernel>::DebugPrinter
fn debug() -> <T as Kernel>::DebugPrinter
source§fn acquire_cpu_lock() -> Result<(), CpuLockError>
fn acquire_cpu_lock() -> Result<(), CpuLockError>
source§unsafe fn release_cpu_lock() -> Result<(), CpuLockError>
unsafe fn release_cpu_lock() -> Result<(), CpuLockError>
source§fn has_cpu_lock() -> bool
fn has_cpu_lock() -> bool
Return a flag indicating whether CPU Lock is currently active.
source§fn boost_priority() -> Result<(), BoostPriorityError>where
T: KernelBoostPriority,
fn boost_priority() -> Result<(), BoostPriorityError>where T: KernelBoostPriority,
Activate Priority Boost. Read more
source§unsafe fn unboost_priority() -> Result<(), BoostPriorityError>
unsafe fn unboost_priority() -> Result<(), BoostPriorityError>
Deactivate Priority Boost. Read more
source§fn is_priority_boost_active() -> bool
fn is_priority_boost_active() -> bool
Return a flag indicating whether Priority Boost is currently active.
source§fn is_task_context() -> bool
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
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
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 time() -> Result<Time, TimeError>where
T: KernelTime,
fn time() -> Result<Time, TimeError>where T: KernelTime,
Get the current system time. Read more
source§fn time_user_headroom() -> Durationwhere
T: KernelAdjustTime,
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 moresource§fn adjust_time(delta: Duration) -> Result<(), AdjustTimeError>where
T: KernelAdjustTime,
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>
unsafe fn exit_task() -> Result<!, ExitTaskError>
Terminate the current task, putting it into the Dormant state. Read more
source§fn park() -> Result<(), ParkError>
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