Trait miri::concurrency::init_once::EvalContextExt

source ·
pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
    // Provided methods
    fn init_once_get_or_create_id(
        &mut self,
        lock_op: &OpTy<'tcx>,
        lock_layout: TyAndLayout<'tcx>,
        offset: u64,
    ) -> InterpResult<'tcx, InitOnceId> { ... }
    fn init_once_status(&mut self, id: InitOnceId) -> InitOnceStatus { ... }
    fn init_once_enqueue_and_block(
        &mut self,
        id: InitOnceId,
        callback: impl UnblockCallback<'tcx> + 'tcx,
    ) { ... }
    fn init_once_begin(&mut self, id: InitOnceId) { ... }
    fn init_once_complete(&mut self, id: InitOnceId) -> InterpResult<'tcx> { ... }
    fn init_once_fail(&mut self, id: InitOnceId) -> InterpResult<'tcx> { ... }
    fn init_once_observe_completed(&mut self, id: InitOnceId) { ... }
}

Provided Methods§

source

fn init_once_get_or_create_id( &mut self, lock_op: &OpTy<'tcx>, lock_layout: TyAndLayout<'tcx>, offset: u64, ) -> InterpResult<'tcx, InitOnceId>

source

fn init_once_status(&mut self, id: InitOnceId) -> InitOnceStatus

source

fn init_once_enqueue_and_block( &mut self, id: InitOnceId, callback: impl UnblockCallback<'tcx> + 'tcx, )

Put the thread into the queue waiting for the initialization.

source

fn init_once_begin(&mut self, id: InitOnceId)

Begin initializing this InitOnce. Must only be called after checking that it is currently uninitialized.

source

fn init_once_complete(&mut self, id: InitOnceId) -> InterpResult<'tcx>

source

fn init_once_fail(&mut self, id: InitOnceId) -> InterpResult<'tcx>

source

fn init_once_observe_completed(&mut self, id: InitOnceId)

Synchronize with the previous completion of an InitOnce. Must only be called after checking that it is complete.

Object Safety§

This trait is not object safe.

Implementors§

source§

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