pub struct CpuInfo {
pub id: u8,
pub online: AtomicBool,
pub idle: AtomicBool,
pub current_task: AtomicU64,
pub load: AtomicU8,
pub nr_running: AtomicU32,
pub scheduler: Mutex<Scheduler>,
pub ready_queue: Mutex<ReadyQueue>,
pub vendor: String,
pub model: String,
pub features: CpuFeatures,
pub page_cache_id: u8,
}Expand description
CPU information
Fields§
§id: u8CPU ID
online: AtomicBoolCPU online status
idle: AtomicBoolCPU idle status
current_task: AtomicU64Current task on this CPU
load: AtomicU8Load average (0-100)
nr_running: AtomicU32Number of tasks in run queue
scheduler: Mutex<Scheduler>Per-CPU scheduler
ready_queue: Mutex<ReadyQueue>Per-CPU ready queue
vendor: StringCPU vendor string
model: StringCPU model string
features: CpuFeaturesCPU features
page_cache_id: u8Per-CPU page frame cache index (matches PER_CPU_PAGE_CACHES slot)
Implementations§
Source§impl CpuInfo
impl CpuInfo
Sourcepub fn bring_online(&self)
pub fn bring_online(&self)
Mark CPU as online
Sourcepub fn bring_offline(&self)
pub fn bring_offline(&self)
Mark CPU as offline
Sourcepub fn update_load(&self)
pub fn update_load(&self)
Update load average