pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
// Provided methods
fn pthread_create(
&mut self,
thread: &OpTy<'tcx>,
_attr: &OpTy<'tcx>,
start_routine: &OpTy<'tcx>,
arg: &OpTy<'tcx>,
) -> InterpResult<'tcx, ()> { ... }
fn pthread_join(
&mut self,
thread: &OpTy<'tcx>,
retval: &OpTy<'tcx>,
) -> InterpResult<'tcx, Scalar> { ... }
fn pthread_detach(
&mut self,
thread: &OpTy<'tcx>,
) -> InterpResult<'tcx, Scalar> { ... }
fn pthread_self(&mut self) -> InterpResult<'tcx, Scalar> { ... }
fn pthread_setname_np(
&mut self,
thread: Scalar,
name: Scalar,
name_max_len: usize,
truncate: bool,
) -> InterpResult<'tcx, ThreadNameResult> { ... }
fn pthread_getname_np(
&mut self,
thread: Scalar,
name_out: Scalar,
len: Scalar,
truncate: bool,
) -> InterpResult<'tcx, ThreadNameResult> { ... }
fn sched_yield(&mut self) -> InterpResult<'tcx, ()> { ... }
}
Provided Methods§
fn pthread_create( &mut self, thread: &OpTy<'tcx>, _attr: &OpTy<'tcx>, start_routine: &OpTy<'tcx>, arg: &OpTy<'tcx>, ) -> InterpResult<'tcx, ()>
fn pthread_join( &mut self, thread: &OpTy<'tcx>, retval: &OpTy<'tcx>, ) -> InterpResult<'tcx, Scalar>
fn pthread_detach(&mut self, thread: &OpTy<'tcx>) -> InterpResult<'tcx, Scalar>
fn pthread_self(&mut self) -> InterpResult<'tcx, Scalar>
Sourcefn pthread_setname_np(
&mut self,
thread: Scalar,
name: Scalar,
name_max_len: usize,
truncate: bool,
) -> InterpResult<'tcx, ThreadNameResult>
fn pthread_setname_np( &mut self, thread: Scalar, name: Scalar, name_max_len: usize, truncate: bool, ) -> InterpResult<'tcx, ThreadNameResult>
Set the name of the specified thread. If the name including the null terminator
is longer or equals to name_max_len
, then if truncate
is set the truncated name
is used as the thread name, otherwise ThreadNameResult::NameTooLong
is returned.
If the specified thread wasn’t found, ThreadNameResult::ThreadNotFound
is returned.
Sourcefn pthread_getname_np(
&mut self,
thread: Scalar,
name_out: Scalar,
len: Scalar,
truncate: bool,
) -> InterpResult<'tcx, ThreadNameResult>
fn pthread_getname_np( &mut self, thread: Scalar, name_out: Scalar, len: Scalar, truncate: bool, ) -> InterpResult<'tcx, ThreadNameResult>
Get the name of the specified thread. If the thread name doesn’t fit
the buffer, then if truncate
is set the truncated name is written out,
otherwise ThreadNameResult::NameTooLong
is returned. If the specified
thread wasn’t found, ThreadNameResult::ThreadNotFound
is returned.