pub struct CpuLocalAuth<V> { /* private fields */ }Expand description
Authoritative logical contents of one CPU-local object.
The domain is fixed at allocation time. Updating a value requires both this
authority and the matching CpuLocalPointsTo, so the executable invariant
cannot change a CPU’s entry without its exclusive per-CPU permission.
Implementations§
Source§impl<V> CpuLocalAuth<V>
impl<V> CpuLocalAuth<V>
Sourcepub proof fn new(initial: Map<CpuId, V>) -> tracked res : (CpuLocalAuth<V>, CpuLocalPointsToSet<V>)
pub proof fn new(initial: Map<CpuId, V>) -> tracked res : (CpuLocalAuth<V>, CpuLocalPointsToSet<V>)
ensures
res.0.id() == res.1.id(),res.0@ == initial,res.1@ == initial,res.0.cpus() == initial.dom(),res.1.cpus() == initial.dom(),Allocates proof state for CPU-local contents described by initial.
Allocation returns the authoritative state and exclusive ownership of every points-to resource. No executable storage is allocated by this proof function.
Sourcepub closed spec fn id(&self) -> Loc
pub closed spec fn id(&self) -> Loc
Identity shared by the authority and all of its points-to resources.
Sourcepub open spec fn cpus(&self) -> Set<CpuId>
pub open spec fn cpus(&self) -> Set<CpuId>
{ self@.dom() }CPUs represented by this CPU-local object.
Trait Implementations§
Auto Trait Implementations§
impl<V> Freeze for CpuLocalAuth<V>
impl<V> RefUnwindSafe for CpuLocalAuth<V>where
V: RefUnwindSafe,
impl<V> Send for CpuLocalAuth<V>where
V: Send,
impl<V> Sync for CpuLocalAuth<V>where
V: Sync,
impl<V> Unpin for CpuLocalAuth<V>where
V: Unpin,
impl<V> UnsafeUnpin for CpuLocalAuth<V>
impl<V> UnwindSafe for CpuLocalAuth<V>where
V: 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