Expand description
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.
impl<System: Kernel, PortTaskState: 'static + Debug, TaskReadyQueue: 'static + Debug, TaskPriority: 'static + Debug, TimeoutHeap: 'static + Debug> Debug for State<System, PortTaskState, TaskReadyQueue, TaskPriority, TimeoutHeap>
Formats the value using the given formatter. Read more
impl<System: KernelCfg2, PortTaskState: 'static, TaskReadyQueue: 'static + Init, TaskPriority: 'static, TimeoutHeap: 'static + Init> Init for State<System, PortTaskState, TaskReadyQueue, TaskPriority, TimeoutHeap>
impl<System, PortTaskState, TaskReadyQueue, TaskPriority, TimeoutHeap> Send for State<System, PortTaskState, TaskReadyQueue, TaskPriority, TimeoutHeap> where
PortTaskState: Sync,
TaskPriority: Send + Sync,
TaskReadyQueue: Send,
TimeoutHeap: Send,
impl<System, PortTaskState, TaskReadyQueue, TaskPriority, TimeoutHeap> Sync for State<System, PortTaskState, TaskReadyQueue, TaskPriority, TimeoutHeap> where
PortTaskState: Sync,
TaskPriority: Send + Sync,
TaskReadyQueue: Sync,
TimeoutHeap: Send,
impl<System, PortTaskState, TaskReadyQueue, TaskPriority, TimeoutHeap> Unpin for State<System, PortTaskState, TaskReadyQueue, TaskPriority, TimeoutHeap> where
TaskReadyQueue: Unpin,
TimeoutHeap: Unpin,
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.