miri::shims::unix::sync

Function mutex_get_id

source
fn mutex_get_id<'tcx>(
    ecx: &mut MiriInterpCx<'tcx>,
    mutex_ptr: &OpTy<'tcx>,
) -> InterpResult<'tcx, MutexId>
Expand description

Returns the MutexId of the mutex stored at mutex_op.

mutex_get_id will also check if the mutex has been moved since its first use and return an error if it has.