miri::shims::unix::sync

Function mutex_init_offset

Source
fn mutex_init_offset<'tcx>(ecx: &MiriInterpCx<'tcx>) -> InterpResult<'tcx, Size>
Expand description

To ensure an initialized mutex that was moved somewhere else can be distinguished from a statically initialized mutex that is used the first time, we pick some offset within pthread_mutex_t and use it as an “initialized” flag.