[][src]Struct r3::kernel::State

pub struct State<System: KernelCfg2, PortTaskState: 'static = <System as PortThreading>::PortTaskState, TaskReadyQueue: 'static = <System as KernelCfg1>::TaskReadyQueue, TaskPriority: 'static = <System as KernelCfg1>::TaskPriority, TimeoutHeap: 'static = <System as KernelCfg2>::TimeoutHeap> { /* fields omitted */ }

Global kernel state.

Implementations

impl<System: KernelCfg2> State<System>[src]

pub fn running_task_ptr(&self) -> *mut Option<&'static TaskCb<System>>[src]

Get a pointer to the variable storing the currently running task.

Reading the variable is safe as long as the read is free of data race. Note that only the dispatcher (that calls PortToKernel::choose_running_task) can modify the variable asynchonously. For example, it's safe to read it in a task context. It's also safe to read it in the dispatcher. On the other hand, reading it in a non-task context (except for the dispatcher, of course) may lead to an undefined behavior unless CPU Lock is activated while reading the variable.

Writing the variable is not allowed.

Trait Implementations

impl<System: Kernel, PortTaskState: 'static + Debug, TaskReadyQueue: 'static + Debug, TaskPriority: 'static + Debug, TimeoutHeap: 'static + Debug> Debug for State<System, PortTaskState, TaskReadyQueue, TaskPriority, TimeoutHeap>[src]

impl<System: KernelCfg2, PortTaskState: 'static, TaskReadyQueue: 'static + Init, TaskPriority: 'static, TimeoutHeap: 'static + Init> Init for State<System, PortTaskState, TaskReadyQueue, TaskPriority, TimeoutHeap>[src]

Auto Trait Implementations

impl<System, PortTaskState, TaskReadyQueue, TaskPriority, TimeoutHeap> Send for State<System, PortTaskState, TaskReadyQueue, TaskPriority, TimeoutHeap> where
    PortTaskState: Sync,
    TaskPriority: Send + Sync,
    TaskReadyQueue: Send,
    TimeoutHeap: Send + Sync,
    <<System as KernelCfg1>::TaskReadyQueue as Queue<System>>::PerTaskData: Sync,
    <System as PortThreading>::PortTaskState: Sync,
    <System as KernelCfg1>::TaskPriority: Send + Sync

impl<System, PortTaskState, TaskReadyQueue, TaskPriority, TimeoutHeap> Sync for State<System, PortTaskState, TaskReadyQueue, TaskPriority, TimeoutHeap> where
    PortTaskState: Sync,
    TaskPriority: Send + Sync,
    TaskReadyQueue: Sync,
    TimeoutHeap: Send + Sync,
    <<System as KernelCfg1>::TaskReadyQueue as Queue<System>>::PerTaskData: Sync,
    <System as PortThreading>::PortTaskState: Sync,
    <System as KernelCfg1>::TaskPriority: Send + Sync

impl<System, PortTaskState, TaskReadyQueue, TaskPriority, TimeoutHeap> Unpin for State<System, PortTaskState, TaskReadyQueue, TaskPriority, TimeoutHeap> where
    System: Unpin,
    TaskReadyQueue: Unpin,
    TimeoutHeap: Unpin

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.