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

Method active_vcpus

vmm/src/cpu.rs:1663–1667  ·  view source on GitHub ↗

Counts the number of active vCPUs (running vCPU threads).

(vcpu_states: &[VcpuState])

Source from the content-addressed store, hash-verified

1661
1662 /// Counts the number of active vCPUs (running vCPU threads).
1663 fn active_vcpus(vcpu_states: &[VcpuState]) -> u32 {
1664 vcpu_states
1665 .iter()
1666 .fold(0, |acc, state| acc + state.active() as u32)
1667 }
1668
1669 #[cfg(target_arch = "aarch64")]
1670 pub fn get_mpidrs(&self) -> Vec<u64> {

Callers

nothing calls this directly

Calls 3

iterMethod · 0.80
activeMethod · 0.80
present_vcpusMethod · 0.80

Tested by

no test coverage detected