pub fn write(&self, v: u64) -> result::Result<(), io::Error> {
        // This is safe because we made this fd and the pointer we pass can not overflow because we
        // give the syscall's size parameter properly.
        let ret = unsafe {
            write(
                self.as_raw_fd(),
                &v as *const u64 as *const c_void,
                mem::size_of::<u64>(),
            )
        };
        if ret <= 0 {
            Err(io::Error::last_os_error())
        } else {
            Ok(())
        }
    }
/// Adds `v` to the eventfd's count, does not block if the result will overflow the count
Adds `v` to the eventfd's count, does not block if the result will overflow the count
Adds ` v ` to the eventfd ' s count does not block if the result will overflow the count
pub fn write(&self, v: u64) -> result::Result<(), io::Error> {
        // This is safe because we made this fd and the pointer we pass can not overflow because we
        // give the syscall's size parameter properly.
        let ret = unsafe {
            write(
                self.as_raw_fd(),
                &v as *const u64 as *const c_void,
                mem::size_of::<u64>(),
            )
        };
        if ret <= 0 {
            Err(io::Error::last_os_error())
        } else {
            Ok(())
        }
    }
pub fn write ( & self , v : u64 ) -> result :: Result < ( ) , io :: Error > { // This is safe because we made this fd and the pointer we pass can not overflow because we // give the syscall's size parameter properly. let ret = unsafe { write ( self . as_raw_fd ( ) , & v as * const u64 as * const c_void , mem :: size_of :: < u64 > ( ) , ) } ; if ret <= 0 { Err ( io :: Error :: last_os_error ( ) ) } else { Ok ( ( ) ) } }
Adds `v` to the eventfd's count, does not block if the result will overflow the count
Adds ` v ` to the eventfd ' s count does not block if the result will overflow the count
&self
v
u64