miri::shims::unix::thread

Trait EvalContextExt

source
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, ()> { ... }
    fn pthread_detach(&mut self, thread: &OpTy<'tcx>) -> InterpResult<'tcx, ()> { ... }
    fn pthread_self(&mut self) -> InterpResult<'tcx, Scalar> { ... }
    fn pthread_setname_np(
        &mut self,
        thread: Scalar,
        name: Scalar,
        name_max_len: usize,
    ) -> InterpResult<'tcx, bool> { ... }
    fn pthread_getname_np(
        &mut self,
        thread: Scalar,
        name_out: Scalar,
        len: Scalar,
        truncate: bool,
    ) -> InterpResult<'tcx, bool> { ... }
    fn sched_yield(&mut self) -> InterpResult<'tcx, ()> { ... }
}

Provided Methods§

source

fn pthread_create( &mut self, thread: &OpTy<'tcx>, _attr: &OpTy<'tcx>, start_routine: &OpTy<'tcx>, arg: &OpTy<'tcx>, ) -> InterpResult<'tcx, ()>

source

fn pthread_join( &mut self, thread: &OpTy<'tcx>, retval: &OpTy<'tcx>, ) -> InterpResult<'tcx, ()>

source

fn pthread_detach(&mut self, thread: &OpTy<'tcx>) -> InterpResult<'tcx, ()>

source

fn pthread_self(&mut self) -> InterpResult<'tcx, Scalar>

source

fn pthread_setname_np( &mut self, thread: Scalar, name: Scalar, name_max_len: usize, ) -> InterpResult<'tcx, bool>

Set the name of the specified thread. If the name including the null terminator is longer than name_max_len, then false is returned.

source

fn pthread_getname_np( &mut self, thread: Scalar, name_out: Scalar, len: Scalar, truncate: bool, ) -> InterpResult<'tcx, bool>

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 false is returned.

source

fn sched_yield(&mut self) -> InterpResult<'tcx, ()>

Implementors§

source§

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