pub struct SchedTaskMemory<const STACK_U64S: usize, const TCB_U64S: usize = SCHED_TASK_TCB_U64S> { /* private fields */ }Expand description
One spawned sched task’s stack and control block, as ONE named static
the entry owns. STACK_U64S is the sched task’s stack in 8-byte words;
TCB_U64S the control-block region, SCHED_TASK_TCB_U64S by default and
0 for a kernel whose control block the port keeps itself (Zephyr’s
struct k_thread — 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> SchedTaskMemory<STACK_U64S, TCB_U64S>
impl<const STACK_U64S: usize, const TCB_U64S: usize> SchedTaskMemory<STACK_U64S, TCB_U64S>
Sourcepub const fn new() -> Self
pub const fn new() -> Self
An untouched reservation, const so it initialises a static
(all-zero .bss, no flash).
Sourcepub const fn raw(&'static self) -> SchedTaskMemoryRaw
pub const fn raw(&'static self) -> SchedTaskMemoryRaw
The raw row for this static — const, so the entry builds its
SchedTaskMemorySet in a static initialiser.
Trait Implementations§
impl<const STACK_U64S: usize, const TCB_U64S: usize> Sync for SchedTaskMemory<STACK_U64S, TCB_U64S>
Auto Trait Implementations§
impl<const STACK_U64S: usize, const TCB_U64S: usize = SCHED_TASK_TCB_U64S> !Freeze for SchedTaskMemory<STACK_U64S, TCB_U64S>
impl<const STACK_U64S: usize, const TCB_U64S: usize = SCHED_TASK_TCB_U64S> !RefUnwindSafe for SchedTaskMemory<STACK_U64S, TCB_U64S>
impl<const STACK_U64S: usize, const TCB_U64S: usize> Send for SchedTaskMemory<STACK_U64S, TCB_U64S>
impl<const STACK_U64S: usize, const TCB_U64S: usize> Unpin for SchedTaskMemory<STACK_U64S, TCB_U64S>
impl<const STACK_U64S: usize, const TCB_U64S: usize> UnsafeUnpin for SchedTaskMemory<STACK_U64S, TCB_U64S>
impl<const STACK_U64S: usize, const TCB_U64S: usize> UnwindSafe for SchedTaskMemory<STACK_U64S, TCB_U64S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more