Trait miri::shims::unix::linux::eventfd::EvalContextExt

source ·
pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
    // Provided method
    fn eventfd(
        &mut self,
        val: &OpTy<'tcx>,
        flags: &OpTy<'tcx>,
    ) -> InterpResult<'tcx, Scalar> { ... }
}

Provided Methods§

source

fn eventfd( &mut self, val: &OpTy<'tcx>, flags: &OpTy<'tcx>, ) -> InterpResult<'tcx, Scalar>

This function creates an Event that is used as an event wait/notify mechanism by user-space applications, and by the kernel to notify user-space applications of events. The Event contains an u64 counter maintained by the kernel. The counter is initialized with the value specified in the initval argument.

A new file descriptor referring to the Event is returned. The read, write, poll, select, and close operations can be performed on the file descriptor. For more information on these operations, see the man page linked below.

The flags are not currently implemented for eventfd. The flags may be bitwise ORed to change the behavior of eventfd: EFD_CLOEXEC - Set the close-on-exec (FD_CLOEXEC) flag on the new file descriptor. EFD_NONBLOCK - Set the O_NONBLOCK file status flag on the new open file description. EFD_SEMAPHORE - miri does not support semaphore-like semantics.

https://linux.die.net/man/2/eventfd

Implementors§

source§

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