pub struct LoadCommitter<T, C: Container<Value = FMap<Timestamp, (T, SyncView)>>>(/* private fields */);Expand description
Wrapper around a single atomic load operation, where multiple ghost steps can be performed.
Note: this committer has no observable effect on ghost ressources. Thus, it is optional to shoot it, and nothing prevent the user from shooting it several times.
Implementations§
Source§impl<T, C: Container<Value = FMap<Timestamp, (T, SyncView)>> + HasTimestamp> LoadCommitter<T, C>
impl<T, C: Container<Value = FMap<Timestamp, (T, SyncView)>> + HasTimestamp> LoadCommitter<T, C>
Sourcepub fn ward(self) -> C
pub fn ward(self) -> C
Identity of the committer
This is used so that we can only use the committer with the right [AtomicOwn].
logic(opaque) ⚠
Sourcepub fn shoot(&self, own: &Perm<C>, view: &mut SyncView) -> Timestamp
pub fn shoot(&self, own: &Perm<C>, view: &mut SyncView) -> Timestamp
‘Shoot’ the committer
This does the read on the atomic in ghost code.
requires
self.ward() == *own.ward()ensures
(*view).le_log(^view)ensures
self.ward().get_timestamp(*view) <= resultensures
result <= self.ward().get_timestamp(^view)ensures
match own.val().get(result) { Some((v, v_view)) => v == self.val() && v_view.le_log(^view), None => false }
terminates
ghost
Auto Trait Implementations§
impl<T, C> Freeze for LoadCommitter<T, C>
impl<T, C> Objective for LoadCommitter<T, C>
impl<T, C> RefUnwindSafe for LoadCommitter<T, C>where
T: RefUnwindSafe,
C: RefUnwindSafe,
impl<T, C> Send for LoadCommitter<T, C>
impl<T, C> Sync for LoadCommitter<T, C>
impl<T, C> Unpin for LoadCommitter<T, C>
impl<T, C> UnsafeUnpin for LoadCommitter<T, C>
impl<T, C> UnwindSafe for LoadCommitter<T, C>where
T: UnwindSafe,
C: 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