Trait miri::concurrency::weak_memory::EvalContextExt
source · pub(super) trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
// Provided methods
fn buffered_atomic_rmw(
&mut self,
new_val: Scalar,
place: &MPlaceTy<'tcx>,
atomic: AtomicRwOrd,
init: Scalar,
) -> InterpResult<'tcx> { ... }
fn buffered_atomic_read(
&self,
place: &MPlaceTy<'tcx>,
atomic: AtomicReadOrd,
latest_in_mo: Scalar,
validate: impl FnOnce() -> InterpResult<'tcx>,
) -> InterpResult<'tcx, Option<Scalar>> { ... }
fn buffered_atomic_write(
&mut self,
val: Scalar,
dest: &MPlaceTy<'tcx>,
atomic: AtomicWriteOrd,
init: Option<Scalar>,
) -> InterpResult<'tcx> { ... }
fn perform_read_on_buffered_latest(
&self,
place: &MPlaceTy<'tcx>,
atomic: AtomicReadOrd,
) -> InterpResult<'tcx> { ... }
}
Provided Methods§
fn buffered_atomic_rmw( &mut self, new_val: Scalar, place: &MPlaceTy<'tcx>, atomic: AtomicRwOrd, init: Scalar, ) -> InterpResult<'tcx>
fn buffered_atomic_read( &self, place: &MPlaceTy<'tcx>, atomic: AtomicReadOrd, latest_in_mo: Scalar, validate: impl FnOnce() -> InterpResult<'tcx>, ) -> InterpResult<'tcx, Option<Scalar>>
sourcefn buffered_atomic_write(
&mut self,
val: Scalar,
dest: &MPlaceTy<'tcx>,
atomic: AtomicWriteOrd,
init: Option<Scalar>,
) -> InterpResult<'tcx>
fn buffered_atomic_write( &mut self, val: Scalar, dest: &MPlaceTy<'tcx>, atomic: AtomicWriteOrd, init: Option<Scalar>, ) -> InterpResult<'tcx>
Add the given write to the store buffer. (Does not change machine memory.)
init
says with which value to initialize the store buffer in case there wasn’t a store
buffer for this memory range before.
sourcefn perform_read_on_buffered_latest(
&self,
place: &MPlaceTy<'tcx>,
atomic: AtomicReadOrd,
) -> InterpResult<'tcx>
fn perform_read_on_buffered_latest( &self, place: &MPlaceTy<'tcx>, atomic: AtomicReadOrd, ) -> InterpResult<'tcx>
Caller should never need to consult the store buffer for the latest value. This function is used exclusively for failed atomic_compare_exchange_scalar to perform load_impl on the latest store element
Object Safety§
This trait is not object safe.