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

Method exit_event

vhost_user_block/src/lib.rs:435–444  ·  view source on GitHub ↗
(&self, thread_index: usize)

Source from the content-addressed store, hash-verified

433 }
434
435 fn exit_event(&self, thread_index: usize) -> Option<(EventConsumer, EventNotifier)> {
436 let kill_evt = &self.threads[thread_index].lock().unwrap().kill_evt;
437 // SAFETY: kill_evt is a valid eventfd
438 unsafe {
439 Some((
440 EventConsumer::from_raw_fd(kill_evt.try_clone().unwrap().into_raw_fd()),
441 EventNotifier::from_raw_fd(kill_evt.try_clone().unwrap().into_raw_fd()),
442 ))
443 }
444 }
445
446 fn queues_per_thread(&self) -> Vec<u64> {
447 self.queues_per_thread.clone()

Callers

nothing calls this directly

Calls 1

try_cloneMethod · 0.45

Tested by

no test coverage detected