Trait miri::concurrency::sync::EvalContextExtPriv

source ·
pub(super) trait EvalContextExtPriv<'tcx>: MiriInterpCxExt<'tcx> {
    // Provided methods
    fn get_or_create_id<Id: SyncId>(
        &mut self,
        next_id: Id,
        lock_op: &OpTy<'tcx>,
        lock_layout: TyAndLayout<'tcx>,
        offset: u64,
    ) -> InterpResult<'tcx, Option<Id>> { ... }
    fn mutex_get_or_create<F>(
        &mut self,
        existing: F,
    ) -> InterpResult<'tcx, MutexId>
       where F: FnOnce(&mut MiriInterpCx<'tcx>, MutexId) -> InterpResult<'tcx, Option<MutexId>> { ... }
    fn rwlock_get_or_create<F>(
        &mut self,
        existing: F,
    ) -> InterpResult<'tcx, RwLockId>
       where F: FnOnce(&mut MiriInterpCx<'tcx>, RwLockId) -> InterpResult<'tcx, Option<RwLockId>> { ... }
    fn condvar_get_or_create<F>(
        &mut self,
        existing: F,
    ) -> InterpResult<'tcx, CondvarId>
       where F: FnOnce(&mut MiriInterpCx<'tcx>, CondvarId) -> InterpResult<'tcx, Option<CondvarId>> { ... }
    fn condvar_reacquire_mutex(
        &mut self,
        mutex: MutexId,
        retval: Scalar,
        dest: MPlaceTy<'tcx>,
    ) -> InterpResult<'tcx> { ... }
}

Provided Methods§

source

fn get_or_create_id<Id: SyncId>( &mut self, next_id: Id, lock_op: &OpTy<'tcx>, lock_layout: TyAndLayout<'tcx>, offset: u64, ) -> InterpResult<'tcx, Option<Id>>

Lazily initialize the ID of this Miri sync structure. (‘0’ indicates uninit.)

source

fn mutex_get_or_create<F>(&mut self, existing: F) -> InterpResult<'tcx, MutexId>
where F: FnOnce(&mut MiriInterpCx<'tcx>, MutexId) -> InterpResult<'tcx, Option<MutexId>>,

Provides the closure with the next MutexId. Creates that mutex if the closure returns None, otherwise returns the value from the closure.

source

fn rwlock_get_or_create<F>( &mut self, existing: F, ) -> InterpResult<'tcx, RwLockId>
where F: FnOnce(&mut MiriInterpCx<'tcx>, RwLockId) -> InterpResult<'tcx, Option<RwLockId>>,

Provides the closure with the next RwLockId. Creates that RwLock if the closure returns None, otherwise returns the value from the closure.

source

fn condvar_get_or_create<F>( &mut self, existing: F, ) -> InterpResult<'tcx, CondvarId>
where F: FnOnce(&mut MiriInterpCx<'tcx>, CondvarId) -> InterpResult<'tcx, Option<CondvarId>>,

Provides the closure with the next CondvarId. Creates that Condvar if the closure returns None, otherwise returns the value from the closure.

source

fn condvar_reacquire_mutex( &mut self, mutex: MutexId, retval: Scalar, dest: MPlaceTy<'tcx>, ) -> InterpResult<'tcx>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'tcx> EvalContextExtPriv<'tcx> for MiriInterpCx<'tcx>