somehal 0.7.6

SomeHAL: A hardware abstraction layer for kernel development.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Current CPU helpers shared by architecture backends.

/// Returns the current logical CPU index.
///
/// This prefers the kernel runtime interface. Before the kernel can provide a
/// runtime answer, it falls back to the early boot CPU-index convention exposed
/// by `someboot`.
pub fn current_cpu_idx() -> Option<usize> {
    crate::setup::kernel()
        .current_cpu_idx()
        .or_else(someboot::smp::try_early_cpu_idx)
}