Trait miri::concurrency::sync::EvalContextExtPriv
source · pub(super) trait EvalContextExtPriv<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
// Provided methods
fn get_or_create_id<Id: SyncId>(
&mut self,
next_id: Id,
lock_op: &OpTy<'tcx, Provenance>,
lock_layout: TyAndLayout<'tcx>,
offset: u64
) -> InterpResult<'tcx, Option<Id>> { ... }
fn rwlock_dequeue_and_lock_reader(&mut self, id: RwLockId) -> bool { ... }
fn rwlock_dequeue_and_lock_writer(&mut self, id: RwLockId) -> bool { ... }
fn mutex_dequeue_and_lock(&mut self, id: MutexId) -> bool { ... }
}
Provided Methods§
sourcefn get_or_create_id<Id: SyncId>(
&mut self,
next_id: Id,
lock_op: &OpTy<'tcx, Provenance>,
lock_layout: TyAndLayout<'tcx>,
offset: u64
) -> InterpResult<'tcx, Option<Id>>
fn get_or_create_id<Id: SyncId>( &mut self, next_id: Id, lock_op: &OpTy<'tcx, Provenance>, lock_layout: TyAndLayout<'tcx>, offset: u64 ) -> InterpResult<'tcx, Option<Id>>
Lazily initialize the ID of this Miri sync structure. (‘0’ indicates uninit.)
sourcefn rwlock_dequeue_and_lock_reader(&mut self, id: RwLockId) -> bool
fn rwlock_dequeue_and_lock_reader(&mut self, id: RwLockId) -> bool
Take a reader out of the queue waiting for the lock.
Returns true
if some thread got the rwlock.
sourcefn rwlock_dequeue_and_lock_writer(&mut self, id: RwLockId) -> bool
fn rwlock_dequeue_and_lock_writer(&mut self, id: RwLockId) -> bool
Take the writer out of the queue waiting for the lock.
Returns true
if some thread got the rwlock.
sourcefn mutex_dequeue_and_lock(&mut self, id: MutexId) -> bool
fn mutex_dequeue_and_lock(&mut self, id: MutexId) -> bool
Take a thread out of the queue waiting for the mutex, and lock
the mutex for it. Returns true
if some thread has the mutex now.
Object Safety§
This trait is not object safe.