logo
pub struct State<Traits: KernelCfg2, PortTaskState: 'static = <Traits as PortThreading>::PortTaskState, TaskReadyQueue: 'static = <Traits as KernelCfg1>::TaskReadyQueue, TaskPriority: 'static = <Traits as KernelCfg1>::TaskPriority, TimeoutHeap: 'static = <Traits as KernelCfg2>::TimeoutHeap> { /* private fields */ }
Expand description

Global kernel state.

Implementations

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

Formats the value using the given formatter. Read more

The default value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.