@@ -23,13 +23,13 @@ use std::io::Result;
2323use std:: ops:: Deref ;
2424use std:: sync:: { Arc , Mutex , RwLock } ;
2525
26+ use mio:: Interest ;
2627use vhost:: vhost_user:: message:: {
2728 VhostTransferStateDirection , VhostTransferStatePhase , VhostUserProtocolFeatures ,
2829 VhostUserSharedMsg ,
2930} ;
3031use vhost:: vhost_user:: Backend ;
3132use vm_memory:: bitmap:: Bitmap ;
32- use vmm_sys_util:: epoll:: EventSet ;
3333use vmm_sys_util:: eventfd:: EventFd ;
3434
3535use vhost:: vhost_user:: GpuBackend ;
@@ -144,7 +144,7 @@ pub trait VhostUserBackend: Send + Sync {
144144 fn handle_event (
145145 & self ,
146146 device_event : u16 ,
147- evset : EventSet ,
147+ evset : Interest ,
148148 vrings : & [ Self :: Vring ] ,
149149 thread_id : usize ,
150150 ) -> Result < ( ) > ;
@@ -287,7 +287,7 @@ pub trait VhostUserBackendMut: Send + Sync {
287287 fn handle_event (
288288 & mut self ,
289289 device_event : u16 ,
290- evset : EventSet ,
290+ evset : Interest ,
291291 vrings : & [ Self :: Vring ] ,
292292 thread_id : usize ,
293293 ) -> Result < ( ) > ;
@@ -389,7 +389,7 @@ impl<T: VhostUserBackend> VhostUserBackend for Arc<T> {
389389 fn handle_event (
390390 & self ,
391391 device_event : u16 ,
392- evset : EventSet ,
392+ evset : Interest ,
393393 vrings : & [ Self :: Vring ] ,
394394 thread_id : usize ,
395395 ) -> Result < ( ) > {
@@ -478,7 +478,7 @@ impl<T: VhostUserBackendMut> VhostUserBackend for Mutex<T> {
478478 fn handle_event (
479479 & self ,
480480 device_event : u16 ,
481- evset : EventSet ,
481+ evset : Interest ,
482482 vrings : & [ Self :: Vring ] ,
483483 thread_id : usize ,
484484 ) -> Result < ( ) > {
@@ -570,7 +570,7 @@ impl<T: VhostUserBackendMut> VhostUserBackend for RwLock<T> {
570570 fn handle_event (
571571 & self ,
572572 device_event : u16 ,
573- evset : EventSet ,
573+ evset : Interest ,
574574 vrings : & [ Self :: Vring ] ,
575575 thread_id : usize ,
576576 ) -> Result < ( ) > {
@@ -600,6 +600,7 @@ pub mod tests {
600600 use super :: * ;
601601 use crate :: VringRwLock ;
602602 use libc:: EFD_NONBLOCK ;
603+ use mio:: Interest ;
603604 use std:: sync:: Mutex ;
604605 use uuid:: Uuid ;
605606 use vm_memory:: { GuestAddress , GuestMemoryAtomic , GuestMemoryMmap } ;
@@ -707,7 +708,7 @@ pub mod tests {
707708 fn handle_event (
708709 & mut self ,
709710 _device_event : u16 ,
710- _evset : EventSet ,
711+ _evset : Interest ,
711712 _vrings : & [ VringRwLock ] ,
712713 _thread_id : usize ,
713714 ) -> Result < ( ) > {
@@ -793,7 +794,7 @@ pub mod tests {
793794
794795 let vring = VringRwLock :: new ( mem, 0x1000 ) . unwrap ( ) ;
795796 backend
796- . handle_event ( 0x1 , EventSet :: IN , & [ vring] , 0 )
797+ . handle_event ( 0x1 , Interest :: READABLE , & [ vring] , 0 )
797798 . unwrap ( ) ;
798799
799800 backend. reset_device ( ) ;
0 commit comments