pub struct CurrentCpuLocalHandle(/* private fields */);Expand description
Opaque address of the current CPU’s pinned owner-only scheduler object.
Consumers must claim the corresponding crate::runtime::cpu::CpuRemote owner gate
before reconstructing any reference from this address.
Implementations§
Source§impl CurrentCpuLocalHandle
impl CurrentCpuLocalHandle
Sourcepub const unsafe fn from_raw(raw: usize) -> Self
pub const unsafe fn from_raw(raw: usize) -> Self
Creates a handle from the runtime-owned opaque value.
§Safety
A non-zero raw value must identify a live runtime-owned object
or resource of this exact handle type. The caller must uphold all
provenance, lifetime, pinning, aliasing, and ownership invariants
required by operations that consume or dereference the handle.
Use Self::NONE for the absent-handle sentinel.
ⓘ
use ax_task::runtime::cpu::CurrentCpuLocalHandle;
let _handle = CurrentCpuLocalHandle::from_raw(1);Trait Implementations§
Source§impl Clone for CurrentCpuLocalHandle
impl Clone for CurrentCpuLocalHandle
Source§fn clone(&self) -> CurrentCpuLocalHandle
fn clone(&self) -> CurrentCpuLocalHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CurrentCpuLocalHandle
Source§impl Debug for CurrentCpuLocalHandle
impl Debug for CurrentCpuLocalHandle
impl Eq for CurrentCpuLocalHandle
Source§impl Hash for CurrentCpuLocalHandle
impl Hash for CurrentCpuLocalHandle
Source§impl PartialEq for CurrentCpuLocalHandle
impl PartialEq for CurrentCpuLocalHandle
impl StructuralPartialEq for CurrentCpuLocalHandle
Auto Trait Implementations§
impl Freeze for CurrentCpuLocalHandle
impl RefUnwindSafe for CurrentCpuLocalHandle
impl Send for CurrentCpuLocalHandle
impl Sync for CurrentCpuLocalHandle
impl Unpin for CurrentCpuLocalHandle
impl UnsafeUnpin for CurrentCpuLocalHandle
impl UnwindSafe for CurrentCpuLocalHandle
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