#[repr(C)]pub struct ThreadStack<const SIZE: usize> {
pub data: UnsafeCell<[z_thread_stack_element; SIZE]>,
/* private fields */
}
Expand description
A Zephyr stack declaration.
This isn’t intended to be used directly, as it needs additional decoration about linker sections and such. Unlike the C declaration, the reservation is a separate field. As long as the SIZE is properly aligned, this should work without padding between the fields.
Generally, this should be placed in a noinit linker section to avoid having to initialize the memory.
Fields§
§data: UnsafeCell<[z_thread_stack_element; SIZE]>
The data of the stack itself.
Implementations§
Trait Implementations§
impl<const SIZE: usize> Sync for ThreadStack<SIZE>
Auto Trait Implementations§
impl<const SIZE: usize> !Freeze for ThreadStack<SIZE>
impl<const SIZE: usize> !RefUnwindSafe for ThreadStack<SIZE>
impl<const SIZE: usize> Send for ThreadStack<SIZE>
impl<const SIZE: usize> Unpin for ThreadStack<SIZE>
impl<const SIZE: usize> UnwindSafe for ThreadStack<SIZE>
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