pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
// Provided methods
fn getenv(&mut self, name_op: &OpTy<'tcx>) -> InterpResult<'tcx, Pointer> { ... }
fn setenv(
&mut self,
name_op: &OpTy<'tcx>,
value_op: &OpTy<'tcx>,
) -> InterpResult<'tcx, Scalar> { ... }
fn unsetenv(&mut self, name_op: &OpTy<'tcx>) -> InterpResult<'tcx, Scalar> { ... }
fn getcwd(
&mut self,
buf_op: &OpTy<'tcx>,
size_op: &OpTy<'tcx>,
) -> InterpResult<'tcx, Pointer> { ... }
fn chdir(&mut self, path_op: &OpTy<'tcx>) -> InterpResult<'tcx, Scalar> { ... }
fn update_environ(&mut self) -> InterpResult<'tcx> { ... }
fn getpid(&mut self) -> InterpResult<'tcx, Scalar> { ... }
fn unix_gettid(&mut self, link_name: &str) -> InterpResult<'tcx, Scalar> { ... }
fn apple_pthread_threadip_np(
&mut self,
thread_op: &OpTy<'tcx>,
tid_op: &OpTy<'tcx>,
) -> InterpResult<'tcx, Scalar> { ... }
}
Provided Methods§
fn getenv(&mut self, name_op: &OpTy<'tcx>) -> InterpResult<'tcx, Pointer>
fn setenv( &mut self, name_op: &OpTy<'tcx>, value_op: &OpTy<'tcx>, ) -> InterpResult<'tcx, Scalar>
fn unsetenv(&mut self, name_op: &OpTy<'tcx>) -> InterpResult<'tcx, Scalar>
fn getcwd( &mut self, buf_op: &OpTy<'tcx>, size_op: &OpTy<'tcx>, ) -> InterpResult<'tcx, Pointer>
fn chdir(&mut self, path_op: &OpTy<'tcx>) -> InterpResult<'tcx, Scalar>
Sourcefn update_environ(&mut self) -> InterpResult<'tcx>
fn update_environ(&mut self) -> InterpResult<'tcx>
Updates the environ
static.
fn getpid(&mut self) -> InterpResult<'tcx, Scalar>
Sourcefn unix_gettid(&mut self, link_name: &str) -> InterpResult<'tcx, Scalar>
fn unix_gettid(&mut self, link_name: &str) -> InterpResult<'tcx, Scalar>
The gettid
-like function for Unix platforms that take no parameters and return a 32-bit
integer. It is not always named “gettid”.
Sourcefn apple_pthread_threadip_np(
&mut self,
thread_op: &OpTy<'tcx>,
tid_op: &OpTy<'tcx>,
) -> InterpResult<'tcx, Scalar>
fn apple_pthread_threadip_np( &mut self, thread_op: &OpTy<'tcx>, tid_op: &OpTy<'tcx>, ) -> InterpResult<'tcx, Scalar>
The Apple-specific int pthread_threadid_np(pthread_t thread, uint64_t *thread_id)
, which
allows querying the ID for arbitrary threads, identified by their pthread_t.
API documentation: https://www.manpagez.com/man/3/pthread_threadid_np/.