#[cpu_local]Expand description
A macro for declaring CPU-local variables.
Variables must be an unsigned integer, bar u128.
The initialisation expression has no effect; to set the initial value,
per_cpu::PerCpuData::new must be modified.
Arguments
The macro supports additional named arguments defined after the offset (e.g.
#[cpu_local(0, cls_dep = false)]):
cls_dep: Whether to define methods that depend onclsindirectly adding a dependency onpreemptionandirq_safety. This is only really useful for CPU locals defined inpreemptionto avoid a circular dependency. Defaults to true.stores_guard: If defined, must be set to eitherHeldInterruptsorPreemptionGuardand signifies that the CPU local has the typeOption<Guard>. This option defines special methods that use the guard being switched into the CPU local, rather than an additional guard parameter, as proof that the CPU local can be safely accessed.