/// Unregisters an event from a certain address it has been previously registered to.
///
/// # Arguments
///
/// * `fd` - FD which will be unregistered.
/// * `addr` - Address being written to.
///
/// # Safety
///
/// This function is unsafe because it relies on RawFd.
///
/// # Example
///
/// ```no_run
/// # extern crate libc;
/// # extern crate vmm_sys_util;
/// # use libc::EFD_NONBLOCK;
/// # use vmm_sys_util::eventfd::EventFd;
/// # use crate::mshv_ioctls::*;
/// # use mshv_bindings::*;
/// let hv = Mshv::new().unwrap();
/// let vm = hv.create_vm().unwrap();
/// let evtfd = EventFd::new(EFD_NONBLOCK).unwrap();
/// vm.register_ioevent(&evtfd, &IoEventAddress::Mmio(0x1000), NoDatamatch)
///     .unwrap();
/// vm.unregister_ioevent(&evtfd, &IoEventAddress::Mmio(0x1000), NoDatamatch)
///     .unwrap();
/// ```
Unregisters an event from a certain address it has been previously registered to.
Unregisters an event from a certain address it has been previously registered to .
pub fn unregister_ioevent<T: Into<u64>>(
        &self,
        fd: &EventFd,
        addr: &IoEventAddress,
        datamatch: T,
    ) -> Result<()> {
        self.ioeventfd(fd, addr, datamatch, 1 << mshv_ioeventfd_flag_nr_deassign)
    }
pub fn unregister_ioevent < T : Into < u64 > > ( & self , fd : & EventFd , addr : & IoEventAddress , datamatch : T , ) -> Result < ( ) > { self . ioeventfd ( fd , addr , datamatch , 1 << mshv_ioeventfd_flag_nr_deassign ) }
Unregisters an event from a certain address it has been previously registered to.
Unregisters an event from a certain address it has been previously registered to .
&self
fd
&EventFd
addr
&IoEventAddress
datamatch
T
safety
This function is unsafe because it relies on RawFd.
This function is unsafe because it relies on RawFd .
example
None
extern crate libc;
None
extern crate vmm_sys_util;
None
use libc::efd_nonblock;
None
use vmm_sys_util::eventfd::eventfd;
None
use crate::mshv_ioctls::*;
None
use mshv_bindings::*;
let hv = Mshv::new().unwrap();
let vm = hv.create_vm().unwrap();
let evtfd = EventFd::new(EFD_NONBLOCK).unwrap();
vm.register_ioevent(&evtfd, &IoEventAddress::Mmio(0x1000), NoDatamatch)
.unwrap();
vm.unregister_ioevent(&evtfd, &IoEventAddress::Mmio(0x1000), NoDatamatch)
.unwrap();
```
let hv = Mshv :: new () . unwrap () ; let vm = hv . create_vm () . unwrap () ; let evtfd = EventFd :: new ( EFD_NONBLOCK ) . unwrap () ; vm . register_ioevent ( &evtfd &IoEventAddress :: Mmio ( 0x1000 ) NoDatamatch ) . unwrap () ; vm . unregister_ioevent ( &evtfd &IoEventAddress :: Mmio ( 0x1000 ) NoDatamatch ) . unwrap () ; ` ` `