Skip to main content

cpu_num

Function cpu_num 

Source
pub fn cpu_num() -> usize
Expand description

Gets the number of CPUs running in the system.

When SMP is disabled, this function always returns 1.

When SMP is enabled, it’s the smaller one between the platform-declared CPU number ax_plat::power::cpu_num and the configured maximum CPU number ax_config::plat::MAX_CPU_NUM.

This value is determined during the BSP initialization phase.