pub(crate) struct CpuAffinityMask([u8; 128]);
Expand description
A thread’s CPU affinity mask determines the set of CPUs on which it is eligible to run.
Tuple Fields§
§0: [u8; 128]
Implementations§
Source§impl CpuAffinityMask
impl CpuAffinityMask
pub(crate) const CPU_MASK_BYTES: usize = 128usize
pub fn new<'tcx>(cx: &impl LayoutOf<'tcx>, cpu_count: u32) -> Self
pub fn chunk_size<'tcx>(cx: &impl LayoutOf<'tcx>) -> u64
fn set<'tcx>(&mut self, cx: &impl LayoutOf<'tcx>, cpu: usize)
pub fn as_slice(&self) -> &[u8] ⓘ
pub fn from_array<'tcx>( cx: &impl LayoutOf<'tcx>, cpu_count: u32, bytes: [u8; 128], ) -> Option<Self>
Trait Implementations§
Source§impl Clone for CpuAffinityMask
impl Clone for CpuAffinityMask
Source§fn clone(&self) -> CpuAffinityMask
fn clone(&self) -> CpuAffinityMask
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for CpuAffinityMask
impl RefUnwindSafe for CpuAffinityMask
impl Send for CpuAffinityMask
impl Sync for CpuAffinityMask
impl Unpin for CpuAffinityMask
impl UnwindSafe for CpuAffinityMask
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 128 bytes