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

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

Provided Methods§

source

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

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<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for MiriInterpCx<'mir, 'tcx>