mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-25 02:13:24 +00:00
Handle VmSpace
's multi-CPU activation
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
cf4aee0061
commit
e04fa6c69d
@ -156,6 +156,11 @@ impl CpuSet {
|
||||
self.bitset.get(cpu_id as usize).as_deref() == Some(&true)
|
||||
}
|
||||
|
||||
/// Returns the number of CPUs in the set.
|
||||
pub fn count(&self) -> usize {
|
||||
self.bitset.count_ones()
|
||||
}
|
||||
|
||||
/// Iterates over the CPUs in the set.
|
||||
pub fn iter(&self) -> IterOnes<'_, usize, Lsb0> {
|
||||
self.bitset.iter_ones()
|
||||
|
Reference in New Issue
Block a user