1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Platform-Specific Implementations.
//!
//! This module acts as a dispatcher for platform-specific code. It uses
//! conditional compilation (`#[cfg]`) to include and re-export types and
//! functions relevant to the target operating system (Linux, macOS, Windows)
//! and architecture (e.g., x86_64).
//!
//! The primary goal is to abstract away platform differences, providing a
//! consistent API at the crate level for functionalities like:
//! - CPU information detection (`CpuInfo::detect()`).
//! - Thread affinity, priority, and real-time promotion.
//!
//! Internal helper modules, such as `common_x86_64`, provide shared logic for
//! specific architectures across different operating systems.
// This module contains platform-specific implementations for CPU information,
// thread affinity, and performance monitoring.
// Conditionally compile and export platform-specific modules.
pub
// Production consumer is Linux (sysfs range lists); the shared fixture
// checker uses it in test builds on every platform.
pub
// Shared expected.txt checker for fixture-driven detection tests (Linux sysfs
// trees, macOS sysctl dumps) - test builds only.
pub
pub
// Compiled for tests on EVERY platform: the macOS detection pipeline is pure
// logic behind a SysctlSource seam, so Linux CI exercises it against recorded
// fixtures (only the live sysctl impl + thread control are macOS-gated inside).
pub
pub
// NOTE: priority mapping is an internal detail since 26.x - each platform's
// table lives in its own scheduling_policy module and is consumed only by
// that platform's set_thread_priority. There is no public SchedulingPolicy
// type anymore (nothing outside the crate ever consumed it).