pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
// Provided methods
fn _umtx_op(
&mut self,
obj: &OpTy<'tcx>,
op: &OpTy<'tcx>,
val: &OpTy<'tcx>,
uaddr: &OpTy<'tcx>,
uaddr2: &OpTy<'tcx>,
dest: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx> { ... }
fn read_umtx_time(
&mut self,
ut: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx, Option<UmtxTime>> { ... }
fn translate_umtx_time_clock_id(
&mut self,
raw_id: i32,
) -> InterpResult<'tcx, TimeoutClock> { ... }
}
Provided Methods§
Sourcefn _umtx_op(
&mut self,
obj: &OpTy<'tcx>,
op: &OpTy<'tcx>,
val: &OpTy<'tcx>,
uaddr: &OpTy<'tcx>,
uaddr2: &OpTy<'tcx>,
dest: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx>
fn _umtx_op( &mut self, obj: &OpTy<'tcx>, op: &OpTy<'tcx>, val: &OpTy<'tcx>, uaddr: &OpTy<'tcx>, uaddr2: &OpTy<'tcx>, dest: &MPlaceTy<'tcx>, ) -> InterpResult<'tcx>
Implementation of the FreeBSD _umtx_op
syscall.
This is used for futex operations on FreeBSD.
obj
: a pointer to the futex object (can be a lot of things, mostly *AtomicU32)
op
: the futex operation to run
val
: the current value of the object as a c_long
(for wait/wake)
uaddr
: op
-specific optional parameter, pointer-sized integer or pointer to an op
-specific struct
uaddr2
: op
-specific optional parameter, pointer-sized integer or pointer to an op
-specific struct
dest
: the place this syscall returns to, 0 for success, -1 for failure
§Note
Curently only the WAIT and WAKE operations are implemented.
Sourcefn read_umtx_time(
&mut self,
ut: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx, Option<UmtxTime>>
fn read_umtx_time( &mut self, ut: &MPlaceTy<'tcx>, ) -> InterpResult<'tcx, Option<UmtxTime>>
Parses a _umtx_time
struct.
Returns None
if the underlying timespec
struct is invalid.
Sourcefn translate_umtx_time_clock_id(
&mut self,
raw_id: i32,
) -> InterpResult<'tcx, TimeoutClock>
fn translate_umtx_time_clock_id( &mut self, raw_id: i32, ) -> InterpResult<'tcx, TimeoutClock>
Translate raw FreeBSD clockid to a Miri TimeoutClock. FIXME: share this code with the pthread and clock_gettime shims.