Trait r3::kernel::raw::KernelBase
source · pub unsafe trait KernelBase: 'static + Debug + Copy + Sized {
type RawDebugPrinter: Debug + Send + Sync;
type RawTaskId: Id;
const RAW_SUPPORTED_QUEUE_ORDERS: &'static [Option<QueueOrderKind>] = &[];
Show 20 methods
fn raw_debug() -> Self::RawDebugPrinter;
fn raw_acquire_cpu_lock() -> Result<(), CpuLockError>;
unsafe fn raw_release_cpu_lock() -> Result<(), CpuLockError>;
fn raw_has_cpu_lock() -> bool;
unsafe fn raw_unboost_priority() -> Result<(), BoostPriorityError>;
fn raw_is_priority_boost_active() -> bool;
fn raw_is_task_context() -> bool;
fn raw_is_interrupt_context() -> bool;
fn raw_is_boot_complete() -> bool;
fn raw_set_time(time: Time) -> Result<(), TimeError>;
unsafe fn raw_exit_task() -> Result<!, ExitTaskError>;
fn raw_park() -> Result<(), ParkError>;
fn raw_park_timeout(timeout: Duration) -> Result<(), ParkTimeoutError>;
fn raw_sleep(duration: Duration) -> Result<(), SleepError>;
fn raw_task_current() -> Result<Self::RawTaskId, GetCurrentTaskError>;
unsafe fn raw_task_activate(
this: Self::RawTaskId
) -> Result<(), ActivateTaskError>;
unsafe fn raw_task_interrupt(
this: Self::RawTaskId
) -> Result<(), InterruptTaskError>;
unsafe fn raw_task_unpark_exact(
this: Self::RawTaskId
) -> Result<(), UnparkExactError>;
unsafe fn raw_task_priority(
this: Self::RawTaskId
) -> Result<usize, GetTaskPriorityError>;
unsafe fn raw_task_effective_priority(
this: Self::RawTaskId
) -> Result<usize, GetTaskPriorityError>;
}
Expand description
Required Associated Types
Provided Associated Constants
sourceconst RAW_SUPPORTED_QUEUE_ORDERS: &'static [Option<QueueOrderKind>] = &[]
const RAW_SUPPORTED_QUEUE_ORDERS: &'static [Option<QueueOrderKind>] = &[]
Used by QueueOrder::is_supported
.
None
elements don’t match any values of QueueOrder
. This might be
useful for conditionally enabling some of them.
The default value is an empty slice.
Required Methods
sourcefn raw_debug() -> Self::RawDebugPrinter
fn raw_debug() -> Self::RawDebugPrinter
Implements Kernel::debug
.
sourcefn raw_acquire_cpu_lock() -> Result<(), CpuLockError>
fn raw_acquire_cpu_lock() -> Result<(), CpuLockError>
Implements Kernel::acquire_cpu_lock
.
sourceunsafe fn raw_release_cpu_lock() -> Result<(), CpuLockError>
unsafe fn raw_release_cpu_lock() -> Result<(), CpuLockError>
Implements Kernel::release_cpu_lock
.
Safety
See the Safety section of Kernel::release_cpu_lock
’s
documentation.
sourcefn raw_has_cpu_lock() -> bool
fn raw_has_cpu_lock() -> bool
Return a flag indicating whether CPU Lock is currently active.
sourceunsafe fn raw_unboost_priority() -> Result<(), BoostPriorityError>
unsafe fn raw_unboost_priority() -> Result<(), BoostPriorityError>
Implements Kernel::unboost_priority
.
Safety
See the Safety section of Kernel::unboost_priority
’s
documentation.
sourcefn raw_is_priority_boost_active() -> bool
fn raw_is_priority_boost_active() -> bool
Implements Kernel::is_priority_boost_active
.
sourcefn raw_is_task_context() -> bool
fn raw_is_task_context() -> bool
Implements Kernel::is_task_context
.
sourcefn raw_is_interrupt_context() -> bool
fn raw_is_interrupt_context() -> bool
Implements Kernel::is_interrupt_context
.
sourcefn raw_is_boot_complete() -> bool
fn raw_is_boot_complete() -> bool
Implements Kernel::is_boot_complete
.
sourcefn raw_set_time(time: Time) -> Result<(), TimeError>
fn raw_set_time(time: Time) -> Result<(), TimeError>
Implements Kernel::set_time
.
sourceunsafe fn raw_exit_task() -> Result<!, ExitTaskError>
unsafe fn raw_exit_task() -> Result<!, ExitTaskError>
sourcefn raw_park_timeout(timeout: Duration) -> Result<(), ParkTimeoutError>
fn raw_park_timeout(timeout: Duration) -> Result<(), ParkTimeoutError>
Implements Kernel::park_timeout
.
sourcefn raw_sleep(duration: Duration) -> Result<(), SleepError>
fn raw_sleep(duration: Duration) -> Result<(), SleepError>
Implements Kernel::sleep
.
sourcefn raw_task_current() -> Result<Self::RawTaskId, GetCurrentTaskError>
fn raw_task_current() -> Result<Self::RawTaskId, GetCurrentTaskError>
Get the current task.