Skip to main content

TierTaskMemory

Struct TierTaskMemory 

Source
pub struct TierTaskMemory<const STACK_U64S: usize, const TCB_U64S: usize = nros_node::::executor::backing::TierTaskMemory::{constant#0}> { /* private fields */ }
Expand description

issue 1598 — each spawned tier’s TASK memory (stack + control block): nros::main! emits one TierTaskMemory static per spawned tier, sized from its stack_bytes, and hands the TierTaskMemorySet rows to a board whose tier runner creates the task over them (FreeRTOS xTaskCreateStatic). issue 1598 — one spawned tier’s stack and control block, as ONE named static the entry owns. STACK_U64S is the tier’s stack in 8-byte words; TCB_U64S the control-block region, TIER_TASK_TCB_U64S by default and 0 for a kernel whose control block the port keeps itself (Zephyr’s struct k_thread, issue 1232 — a Rust entry cannot size it).

The control block comes first and the struct is 64-byte aligned, so the stack starts on a boundary every in-tree kernel accepts for a thread stack (the TCB region is a whole number of 64-byte lines).

Implementations§

Source§

impl<const STACK_U64S: usize, const TCB_U64S: usize> TierTaskMemory<STACK_U64S, TCB_U64S>

Source

pub const fn new() -> TierTaskMemory<STACK_U64S, TCB_U64S>

An untouched reservation, const so it initialises a static (all-zero .bss, no flash).

Source

pub const fn raw(&'static self) -> TierTaskMemoryRaw

The raw row for this static — const, so the entry builds its TierTaskMemorySet in a static initialiser.

Trait Implementations§

Source§

impl<const STACK_U64S: usize, const TCB_U64S: usize> Sync for TierTaskMemory<STACK_U64S, TCB_U64S>

Auto Trait Implementations§

§

impl<const STACK_U64S: usize, const TCB_U64S: usize = nros_node::::executor::backing::TierTaskMemory::{constant#0}> !Freeze for TierTaskMemory<STACK_U64S, TCB_U64S>

§

impl<const STACK_U64S: usize, const TCB_U64S: usize = nros_node::::executor::backing::TierTaskMemory::{constant#0}> !RefUnwindSafe for TierTaskMemory<STACK_U64S, TCB_U64S>

§

impl<const STACK_U64S: usize, const TCB_U64S: usize> Send for TierTaskMemory<STACK_U64S, TCB_U64S>

§

impl<const STACK_U64S: usize, const TCB_U64S: usize> Unpin for TierTaskMemory<STACK_U64S, TCB_U64S>

§

impl<const STACK_U64S: usize, const TCB_U64S: usize> UnsafeUnpin for TierTaskMemory<STACK_U64S, TCB_U64S>

§

impl<const STACK_U64S: usize, const TCB_U64S: usize> UnwindSafe for TierTaskMemory<STACK_U64S, TCB_U64S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.