Module cpu

Source
Expand description

CPU-related definitions.

Re-exportsΒ§

pub use set::AtomicCpuSet;
pub use set::CpuSet;

ModulesΒ§

context
CPU execution context control.
local
CPU local storage.
set
This module contains the implementation of the CPU set and atomic CPU set.

StructsΒ§

CpuId
The ID of a CPU in the system.
CpuIdFromIntError
The error type returned when converting an out-of-range integer to CpuId.

StaticsΒ§

CURRENT_CPU πŸ”’
The current CPU ID.
IS_CURRENT_CPU_INITED πŸ”’
The initialization state of the current CPU ID.
NUM_CPUS πŸ”’
The number of CPUs.

TraitsΒ§

PinCurrentCpu
A marker trait for guard types that can β€œpin” the current task to the current CPU.

FunctionsΒ§

all_cpus
Returns an iterator over all CPUs.
init_num_cpus πŸ”’ ⚠
Initializes the number of CPUs.
init_on_ap πŸ”’ ⚠
This function should be executed after BSP has booted before APs have not booted.cpu_id should be the CPU ID of the AP in the execution.
init_on_bsp πŸ”’ ⚠
This function should be executed after BSP has booted before APs have not booted.This function should be executed after crate::arch::kernel::apic::init.The CPU-local objects should bot be accessed.
num_cpus
Returns the number of CPUs.
set_this_cpu_id πŸ”’ ⚠
Initializes the current CPU ID. During the early boot phase