Skip to main content

Stack

Struct Stack 

Source
pub struct Stack<const BYTES: usize> { /* private fields */ }
Available on crate feature multicore and crate feature rt and non-armv6 only.
Expand description

A statically-allocated stack for a secondary core.

8-byte aligned, since AAPCS requires the stack pointer to be 8-byte aligned at public interfaces. On AArch32 launch carves the top IRQ_STACK_SIZE bytes off for IRQ-mode use (mirroring how core 0’s own stack is laid out in boot.s) and hands the rest to the core’s main (SVC) mode; on AArch64 the whole stack is used. The size is enforced to fit at compile time, not checked at runtime.

Implementations§

Source§

impl<const BYTES: usize> Stack<BYTES>

Source

pub const fn new() -> Self

A new, zeroed stack.

Trait Implementations§

Source§

impl<const BYTES: usize> Default for Stack<BYTES>

Source§

fn default() -> Self

Same as Stack::new – a new, zeroed stack.

Auto Trait Implementations§

§

impl<const BYTES: usize> Freeze for Stack<BYTES>
where [u8; BYTES]: Freeze,

§

impl<const BYTES: usize> RefUnwindSafe for Stack<BYTES>

§

impl<const BYTES: usize> Send for Stack<BYTES>
where [u8; BYTES]: Send,

§

impl<const BYTES: usize> Sync for Stack<BYTES>
where [u8; BYTES]: Sync,

§

impl<const BYTES: usize> Unpin for Stack<BYTES>
where [u8; BYTES]: Unpin,

§

impl<const BYTES: usize> UnsafeUnpin for Stack<BYTES>
where [u8; BYTES]: UnsafeUnpin,

§

impl<const BYTES: usize> UnwindSafe for Stack<BYTES>
where [u8; BYTES]: UnwindSafe,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.