mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-02 01:45:21 +00:00
virtio-devices: Update some comments in epoll_helper.rs
Make some comments more clear. Signed-off-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
parent
6b23227e10
commit
9075809494
@ -34,7 +34,7 @@ pub const EPOLL_HELPER_EVENT_KILL: u16 = 1;
|
|||||||
pub const EPOLL_HELPER_EVENT_LAST: u16 = 15;
|
pub const EPOLL_HELPER_EVENT_LAST: u16 = 15;
|
||||||
|
|
||||||
pub trait EpollHelperHandler {
|
pub trait EpollHelperHandler {
|
||||||
// Return true if execution of the loop should be stopped
|
// Return true if the loop execution should be stopped
|
||||||
fn handle_event(&mut self, helper: &mut EpollHelper, event: &epoll::Event) -> bool;
|
fn handle_event(&mut self, helper: &mut EpollHelper, event: &epoll::Event) -> bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,7 +151,7 @@ impl EpollHelper {
|
|||||||
|
|
||||||
// Drain pause event after the device has been resumed.
|
// Drain pause event after the device has been resumed.
|
||||||
// This ensures the pause event has been seen by each
|
// This ensures the pause event has been seen by each
|
||||||
// and every thread related to this virtio device.
|
// thread related to this virtio device.
|
||||||
let _ = self.pause_evt.read();
|
let _ = self.pause_evt.read();
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user