miri::concurrency::weak_memory

Trait 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§

Source

fn buffered_atomic_rmw( &mut self, new_val: Scalar, place: &MPlaceTy<'tcx>, atomic: AtomicRwOrd, init: Scalar, ) -> InterpResult<'tcx>

Source

fn buffered_atomic_read( &self, place: &MPlaceTy<'tcx>, atomic: AtomicReadOrd, latest_in_mo: Scalar, validate: impl FnOnce() -> InterpResult<'tcx>, ) -> InterpResult<'tcx, Option<Scalar>>

Source

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.

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'tcx> EvalContextExt<'tcx> for MiriInterpCx<'tcx>