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

Method register_file_event

virtio-devices/src/console.rs:366–383  ·  view source on GitHub ↗
(
        &mut self,
        helper: &mut EpollHelper,
    )

Source from the content-addressed store, hash-verified

364 }
365
366 fn register_file_event(
367 &mut self,
368 helper: &mut EpollHelper,
369 ) -> result::Result<(), EpollHelperError> {
370 if self.file_event_registered {
371 return Ok(());
372 }
373
374 // Re-arm the file event.
375 helper.mod_event_custom(
376 self.endpoint.in_file().unwrap().as_raw_fd(),
377 FILE_EVENT,
378 epoll::Events::EPOLLIN | epoll::Events::EPOLLONESHOT,
379 )?;
380 self.file_event_registered = true;
381
382 Ok(())
383 }
384}
385
386impl EpollHelperHandler for ConsoleEpollHandler {

Callers 3

handle_eventMethod · 0.80
handle_timeoutMethod · 0.80
event_listMethod · 0.80

Calls 3

mod_event_customMethod · 0.80
in_fileMethod · 0.80
as_raw_fdMethod · 0.45

Tested by

no test coverage detected