Skip to main contentCrate counters_rs
Source - define_kcounter
- Macro to safely define a new Counter in Rust that is visible to the kernel.
- Counter
- A thread-safe diagnostic handle representing a self-declared kernel counter.
- Descriptor
- Binary-stable C-compatible representation of a kernel counter descriptor.
- Type
- The aggregation type of a kernel counter.
- SMP_MAX_CPUS
- The maximum number of CPUs that this counter descriptor supports.
This value is read from the
SMP_MAX_CPUS environment variable at build time.
- to_array
- Copy a string slice into a fixed-size byte array at compile time, leaving space for a null
terminator.