Trait miri::concurrency::init_once::EvalContextExt
source · pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
fn init_once_get_or_create_id(
&mut self,
lock_op: &OpTy<'tcx, Provenance>,
offset: u64
) -> InterpResult<'tcx, InitOnceId> { ... }
fn init_once_get_or_create<F>(
&mut self,
existing: F
) -> InterpResult<'tcx, InitOnceId>
where
F: FnOnce(&mut MiriInterpCx<'mir, 'tcx>, InitOnceId) -> InterpResult<'tcx, Option<InitOnceId>>,
{ ... }
fn init_once_status(&mut self, id: InitOnceId) -> InitOnceStatus { ... }
fn init_once_enqueue_and_block(
&mut self,
id: InitOnceId,
thread: ThreadId,
callback: Box<dyn MachineCallback<'mir, '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§
fn init_once_get_or_create_id(
&mut self,
lock_op: &OpTy<'tcx, Provenance>,
offset: u64
) -> InterpResult<'tcx, InitOnceId>
sourcefn init_once_get_or_create<F>(
&mut self,
existing: F
) -> InterpResult<'tcx, InitOnceId>where
F: FnOnce(&mut MiriInterpCx<'mir, 'tcx>, InitOnceId) -> InterpResult<'tcx, Option<InitOnceId>>,
fn init_once_get_or_create<F>(
&mut self,
existing: F
) -> InterpResult<'tcx, InitOnceId>where
F: FnOnce(&mut MiriInterpCx<'mir, 'tcx>, InitOnceId) -> InterpResult<'tcx, Option<InitOnceId>>,
Provides the closure with the next InitOnceId. Creates that InitOnce if the closure returns None, otherwise returns the value from the closure.
fn init_once_status(&mut self, id: InitOnceId) -> InitOnceStatus
sourcefn init_once_enqueue_and_block(
&mut self,
id: InitOnceId,
thread: ThreadId,
callback: Box<dyn MachineCallback<'mir, 'tcx> + 'tcx>
)
fn init_once_enqueue_and_block(
&mut self,
id: InitOnceId,
thread: ThreadId,
callback: Box<dyn MachineCallback<'mir, 'tcx> + 'tcx>
)
Put the thread into the queue waiting for the initialization.
sourcefn init_once_begin(&mut self, id: InitOnceId)
fn init_once_begin(&mut self, id: InitOnceId)
Begin initializing this InitOnce. Must only be called after checking that it is currently uninitialized.
fn init_once_complete(&mut self, id: InitOnceId) -> InterpResult<'tcx>
fn init_once_fail(&mut self, id: InitOnceId) -> InterpResult<'tcx>
sourcefn init_once_observe_completed(&mut self, id: InitOnceId)
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.