pub struct CurrentThreadHeader { /* private fields */ }Expand description
Pinned scheduler/architecture header for one execution context.
CPU binding uses a four-phase publication word:
Unbound -> Binding -> Bound -> Unbinding -> next Unbound. The epoch is
retained solely to reject a stale incoming switch tail.
Implementations§
Source§impl CurrentThreadHeader
impl CurrentThreadHeader
Sourcepub const fn new(context: CurrentContext) -> Self
pub const fn new(context: CurrentContext) -> Self
Creates an unbound header before placing it in stable pinned storage.
Sourcepub const fn current_context(&self) -> Option<CurrentContext>
pub const fn current_context(&self) -> Option<CurrentContext>
Returns the immutable runtime context identity, if this is a task.
Sourcepub fn cpu_area(&self) -> Option<CpuAreaRef>
pub fn cpu_area(&self) -> Option<CpuAreaRef>
Returns the stable CPU area while this header is fully bound.
Sourcepub fn cpu_area_base(&self) -> Option<usize>
pub fn cpu_area_base(&self) -> Option<usize>
Returns the raw bound area base used by architecture trap entry.
Sourcepub fn as_non_null(self: Pin<&Self>) -> NonNull<Self>
pub fn as_non_null(self: Pin<&Self>) -> NonNull<Self>
Returns the stable pointer installed in the current-thread register.
Auto Trait Implementations§
impl !Freeze for CurrentThreadHeader
impl RefUnwindSafe for CurrentThreadHeader
impl Send for CurrentThreadHeader
impl Sync for CurrentThreadHeader
impl Unpin for CurrentThreadHeader
impl UnsafeUnpin for CurrentThreadHeader
impl UnwindSafe for CurrentThreadHeader
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