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>
impl<const STACK_U64S: usize, const TCB_U64S: usize> TierTaskMemory<STACK_U64S, TCB_U64S>
Sourcepub const fn new() -> TierTaskMemory<STACK_U64S, TCB_U64S>
pub const fn new() -> TierTaskMemory<STACK_U64S, TCB_U64S>
An untouched reservation, const so it initialises a static
(all-zero .bss, no flash).
Sourcepub const fn raw(&'static self) -> TierTaskMemoryRaw
pub const fn raw(&'static self) -> TierTaskMemoryRaw
The raw row for this static — const, so the entry builds its
TierTaskMemorySet in a static initialiser.