Skip to main content

EvalContextExt

Trait EvalContextExt 

Source
pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
    // Provided methods
    fn get_env_var(
        &mut self,
        name: &OsStr,
    ) -> InterpResult<'tcx, Option<OsString>> { ... }
    fn get_pid(&self) -> u32 { ... }
    fn get_tid(&self, thread: ThreadId) -> u32 { ... }
    fn get_thread_id_from_linux_tid(&self, tid: u32) -> Option<ThreadId> { ... }
}

Provided Methods§

Source

fn get_env_var(&mut self, name: &OsStr) -> InterpResult<'tcx, Option<OsString>>

Try to get an environment variable from the interpreted program’s environment. This is useful for implementing shims which are documented to read from the environment.

Source

fn get_pid(&self) -> u32

Get the process identifier.

Source

fn get_tid(&self, thread: ThreadId) -> u32

Get an “OS” thread ID for any thread.

Source

fn get_thread_id_from_linux_tid(&self, tid: u32) -> Option<ThreadId>

Convert TID back to a ThreadId, or None if it is invalid or the thread has terminated.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'tcx> EvalContextExt<'tcx> for MiriInterpCx<'tcx>