MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / add_event

Method add_event

vmm/src/lib.rs:299–312  ·  view source on GitHub ↗
(&mut self, fd: &T, token: EpollDispatch)

Source from the content-addressed store, hash-verified

297 }
298
299 pub fn add_event<T>(&mut self, fd: &T, token: EpollDispatch) -> result::Result<(), io::Error>
300 where
301 T: AsRawFd,
302 {
303 let dispatch_index = token as u64;
304 epoll::ctl(
305 self.epoll_file.as_raw_fd(),
306 epoll::ControlOptions::EPOLL_CTL_ADD,
307 fd.as_raw_fd(),
308 epoll::Event::new(epoll::Events::EPOLLIN, dispatch_index),
309 )?;
310
311 Ok(())
312 }
313
314 #[cfg(fuzzing)]
315 pub fn add_event_custom<T>(

Callers 2

newMethod · 0.45
http_receiver_stubFunction · 0.45

Calls 2

newFunction · 0.85
as_raw_fdMethod · 0.45

Tested by

no test coverage detected