pub struct LinuxPlatform { /* private fields */ }Expand description
The Linux implementation of Platform.
Implementations§
Source§impl LinuxPlatform
impl LinuxPlatform
pub fn new() -> Self
Sourcepub fn with_sysfs(sysfs: Sysfs) -> Self
pub fn with_sysfs(sysfs: Sysfs) -> Self
Read topology from an alternate filesystem root. Used by tests and
by the hidden --sysroot flag for inspecting a captured tree.
Trait Implementations§
Source§impl Default for LinuxPlatform
impl Default for LinuxPlatform
Source§impl Platform for LinuxPlatform
impl Platform for LinuxPlatform
Source§fn discover_topology(&self) -> Result<Topology>
fn discover_topology(&self) -> Result<Topology>
Discover the full machine topology.
Source§fn pin_current_thread(&self, cpu: LogicalId) -> Result<()>
fn pin_current_thread(&self, cpu: LogicalId) -> Result<()>
Restrict the calling thread to a single logical CPU. Read more
Source§fn set_current_thread_affinity(&self, cpus: &CpuSet) -> Result<()>
fn set_current_thread_affinity(&self, cpus: &CpuSet) -> Result<()>
Set the calling thread’s affinity to an arbitrary set.
Source§fn current_thread_affinity(&self) -> Result<CpuSet>
fn current_thread_affinity(&self) -> Result<CpuSet>
Read the calling thread’s current affinity mask.
Source§fn process_affinity(&self) -> Result<CpuSet>
fn process_affinity(&self) -> Result<CpuSet>
Read the affinity mask of the whole process.
Source§fn thread_switch_counters(&self) -> Option<SwitchCounters>
fn thread_switch_counters(&self) -> Option<SwitchCounters>
Sample the calling thread’s context-switch counters, when the platform
can report them per-thread.
None means “no interference data”, and
callers degrade to statistical outlier detection alone.Auto Trait Implementations§
impl Freeze for LinuxPlatform
impl RefUnwindSafe for LinuxPlatform
impl Send for LinuxPlatform
impl Sync for LinuxPlatform
impl Unpin for LinuxPlatform
impl UnsafeUnpin for LinuxPlatform
impl UnwindSafe for LinuxPlatform
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