pub struct CpuLocalPointsToSet<V> { /* private fields */ }Expand description
CPU-local points-to resources that have not yet been distributed.
A newly allocated model returns all resources in this collection. CPU setup
can split them into individual CpuLocalPointsTo resources and install
each resource in the corresponding CPU core’s proof state.
Implementations§
Source§impl<V> CpuLocalPointsToSet<V>
impl<V> CpuLocalPointsToSet<V>
Sourcepub closed spec fn id(&self) -> Loc
pub closed spec fn id(&self) -> Loc
Identity of the corresponding CpuLocalAuth.
Sourcepub open spec fn cpus(&self) -> Set<CpuId>
pub open spec fn cpus(&self) -> Set<CpuId>
{ self@.dom() }CPUs whose exclusive points-to resources are still held here.
Sourcepub open spec fn contains(&self, cpu: CpuId) -> bool
pub open spec fn contains(&self, cpu: CpuId) -> bool
{ self.cpus().contains(cpu) }Whether this collection currently owns cpu’s points-to resource.
Sourcepub proof fn tracked_take(tracked &mut self, cpu: CpuId) -> tracked res : CpuLocalPointsTo<V>
pub proof fn tracked_take(tracked &mut self, cpu: CpuId) -> tracked res : CpuLocalPointsTo<V>
requires
old(self).contains(cpu),ensuresfinal(self).id() == old(self).id(),res.id() == final(self).id(),res.cpu() == cpu,res.value() == old(self)@[cpu],final(self)@ == old(self)@.remove(cpu),final(self).cpus() == old(self).cpus().remove(cpu),Splits out exclusive ownership of one CPU’s entry.
Sourcepub proof fn tracked_return(tracked &mut self, tracked points_to: CpuLocalPointsTo<V>)
pub proof fn tracked_return(tracked &mut self, tracked points_to: CpuLocalPointsTo<V>)
requires
old(self).id() == points_to.id(),!old(self).contains(points_to.cpu()),ensuresfinal(self).id() == old(self).id(),final(self)@ == old(self)@.insert(points_to.cpu(), points_to.value()),final(self).cpus() == old(self).cpus().insert(points_to.cpu()),Returns an individual points-to resource to this collection.
Trait Implementations§
Auto Trait Implementations§
impl<V> Freeze for CpuLocalPointsToSet<V>
impl<V> RefUnwindSafe for CpuLocalPointsToSet<V>where
V: RefUnwindSafe,
impl<V> Send for CpuLocalPointsToSet<V>where
V: Send,
impl<V> Sync for CpuLocalPointsToSet<V>where
V: Sync,
impl<V> Unpin for CpuLocalPointsToSet<V>where
V: Unpin,
impl<V> UnsafeUnpin for CpuLocalPointsToSet<V>
impl<V> UnwindSafe for CpuLocalPointsToSet<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