aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/cpu.c
Commit message (Collapse)AuthorAgeFilesLines
* rust: cpu: Add CpuId::current() to retrieve current CPU IDViresh Kumar2025-06-121-0/+8
Introduce `CpuId::current()`, a constructor that wraps the C function `raw_smp_processor_id()` to retrieve the current CPU identifier without guaranteeing stability. This function should be used only when the caller can ensure that the CPU ID won't change unexpectedly due to preemption or migration. Suggested-by: Boqun Feng <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Reviewed-by: Boqun Feng <[email protected]>