macro_rules! define_kcounter {
($rust_var:ident, $name:expr, $type:ident) => { ... };
}Expand description
Macro to safely define a new Counter in Rust that is visible to the kernel.
ยงExample
define_kcounter!(MY_COUNTER, "my.custom.counter", Sum);
fn some_kernel_code() {
MY_COUNTER.add(1);
}