pub struct CpuCoreOwnerHandle<L: CpuCoreLocalState> { /* private fields */ }Expand description
Linear identity and scheduling state left while CPU-local resources are temporarily being accessed.
A handle cannot be duplicated. Restoring a CpuCoreOwner requires
returning a local-state aggregate of the same type, with the same ordered
resource identities, whose resources all belong to this handle’s CPU.
Implementations§
Source§impl<L: CpuCoreLocalState> CpuCoreOwnerHandle<L>
impl<L: CpuCoreLocalState> CpuCoreOwnerHandle<L>
Sourcepub closed spec fn current_task(&self) -> Option<Loc>
pub closed spec fn current_task(&self) -> Option<Loc>
Task currently running on this CPU.
Sourcepub open spec fn is_idle(&self) -> bool
pub open spec fn is_idle(&self) -> bool
{ self.current_task() is None }Whether no task is currently associated with this core.
Sourcepub closed spec fn expected_locals_key(&self) -> Seq<Loc>
pub closed spec fn expected_locals_key(&self) -> Seq<Loc>
Ordered resource identities expected when restoring the core.
Sourcepub proof fn tracked_restore(tracked self, tracked locals: L) -> tracked res : CpuCoreOwner<L>
pub proof fn tracked_restore(tracked self, tracked locals: L) -> tracked res : CpuCoreOwner<L>
requires
self.wf(),locals.belongs_to_cpu(self.cpu()),locals.local_key() == self.expected_locals_key(),ensuresres.id() == self.id(),res@ == self@,res.wf(),res.locals() == locals,res.locals().local_key() == self.expected_locals_key(),Restores a complete core after a temporary CPU-local access.
Trait Implementations§
Source§impl<L: CpuCoreLocalState> View for CpuCoreOwnerHandle<L>
impl<L: CpuCoreLocalState> View for CpuCoreOwnerHandle<L>
Auto Trait Implementations§
impl<L> Freeze for CpuCoreOwnerHandle<L>
impl<L> RefUnwindSafe for CpuCoreOwnerHandle<L>where
L: RefUnwindSafe,
impl<L> Send for CpuCoreOwnerHandle<L>where
L: Send,
impl<L> Sync for CpuCoreOwnerHandle<L>where
L: Sync,
impl<L> Unpin for CpuCoreOwnerHandle<L>where
L: Unpin,
impl<L> UnsafeUnpin for CpuCoreOwnerHandle<L>
impl<L> UnwindSafe for CpuCoreOwnerHandle<L>where
L: UnwindSafe,
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