Struct miri::concurrency::cpu_affinity::CpuAffinityMask
source · 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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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