#[repr(C)]pub struct CpuSet { /* private fields */ }
Expand description
CpuSet represent a bit-mask of CPUs. CpuSets are used by sched_setaffinity and sched_getaffinity for example.
This is a wrapper around libc::cpu_set_t
.
Implementations
sourceimpl CpuSet
impl CpuSet
sourcepub fn is_set(&self, field: usize) -> Result<bool>
pub fn is_set(&self, field: usize) -> Result<bool>
Test to see if a CPU is in the CpuSet.
field
is the CPU id to test
sourcepub fn set(&mut self, field: usize) -> Result<()>
pub fn set(&mut self, field: usize) -> Result<()>
Add a CPU to CpuSet.
field
is the CPU id to add
Trait Implementations
impl Copy for CpuSet
impl Eq for CpuSet
impl StructuralEq for CpuSet
impl StructuralPartialEq for CpuSet
Auto Trait Implementations
impl RefUnwindSafe for CpuSet
impl Send for CpuSet
impl Sync for CpuSet
impl Unpin for CpuSet
impl UnwindSafe for CpuSet
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more