Lines Matching defs:CpuSet
4 /// `CpuSet` represents a bit-mask of CPUs.
6 /// `CpuSet`s are used by [`sched_setaffinity`] and [`sched_getaffinity`], for
17 pub struct CpuSet {
21 impl CpuSet {
22 /// The maximum number of CPU in `CpuSet`.
25 /// Create a new and empty `CpuSet`.
33 /// Test to see if a CPU is in the `CpuSet`.
41 /// Add a CPU to `CpuSet`.
49 /// Remove a CPU from `CpuSet`.
57 /// Count the number of CPUs set in the `CpuSet`.
64 /// Zeroes the `CpuSet`.
71 impl Default for CpuSet {
83 /// The `CpuSet` argument specifies the set of CPUs on which the thread will
91 pub fn sched_setaffinity(pid: Option<Pid>, cpuset: &CpuSet) -> io::Result<()> {
107 pub fn sched_getaffinity(pid: Option<Pid>) -> io::Result<CpuSet> {
108 let mut cpuset = CpuSet::new();