fn register_irqfd(&self, fd: &EventFd, gsi: u32) -> vm::Result<()> {
        let dup_fd = fd.try_clone().unwrap();
        let kill_fd = EventFd::new(libc::EFD_NONBLOCK).unwrap();

        let mut ctrl_handler = IrqfdCtrlEpollHandler {
            vm_fd: self.fd.clone(),
            kill: kill_fd.try_clone().unwrap(),
            irqfd: fd.try_clone().unwrap(),
            epoll_fd: 0,
            gsi,
            gsi_routes: self.gsi_routes.clone(),
        };

        debug!("register_irqfd fd {} gsi {}", fd.as_raw_fd(), gsi);

        thread::Builder::new()
            .name(format!("irqfd_{}", gsi))
            .spawn(move || ctrl_handler.run_ctrl())
            .unwrap();

        self.irqfds.lock().unwrap().insert(gsi, (dup_fd, kill_fd));

        Ok(())
    }
///
/// Registers an event that will, when signaled, trigger the `gsi` IRQ.
///
Registers an event that will, when signaled, trigger the `gsi` IRQ.
Registers an event that will when signaled trigger the ` gsi ` IRQ .
fn register_irqfd(&self, fd: &EventFd, gsi: u32) -> vm::Result<()> {
        let dup_fd = fd.try_clone().unwrap();
        let kill_fd = EventFd::new(libc::EFD_NONBLOCK).unwrap();
        let mut ctrl_handler = IrqfdCtrlEpollHandler {
            vm_fd: self.fd.clone(),
            kill: kill_fd.try_clone().unwrap(),
            irqfd: fd.try_clone().unwrap(),
            epoll_fd: 0,
            gsi,
            gsi_routes: self.gsi_routes.clone(),
        };
        debug!("register_irqfd fd {} gsi {}", fd.as_raw_fd(), gsi);
        thread::Builder::new()
            .name(format!("irqfd_{}", gsi))
            .spawn(move || ctrl_handler.run_ctrl())
            .unwrap();
        self.irqfds.lock().unwrap().insert(gsi, (dup_fd, kill_fd));
        Ok(())
    }
fn register_irqfd ( & self , fd : & EventFd , gsi : u32 ) -> vm :: Result < ( ) > { let dup_fd = fd . try_clone ( ) . unwrap ( ) ; let kill_fd = EventFd :: new ( libc :: EFD_NONBLOCK ) . unwrap ( ) ; let mut ctrl_handler = IrqfdCtrlEpollHandler { vm_fd : self . fd . clone ( ) , kill : kill_fd . try_clone ( ) . unwrap ( ) , irqfd : fd . try_clone ( ) . unwrap ( ) , epoll_fd : 0 , gsi , gsi_routes : self . gsi_routes . clone ( ) , } ; debug ! ( " " fd as_raw_fd ( ) gsi ) ; thread :: Builder :: new ( ) . name ( format ! ( " " gsi ) ) . spawn ( move | | ctrl_handler . run_ctrl ( ) ) . unwrap ( ) ; self . irqfds . lock ( ) . unwrap ( ) . insert ( gsi , ( dup_fd , kill_fd ) ) ; Ok ( ( ) ) }
Registers an event that will, when signaled, trigger the `gsi` IRQ.
Registers an event that will when signaled trigger the ` gsi ` IRQ .
&self
fd
&EventFd
gsi
u32
&self
fd
&EventFd
gsi
u32