macro_rules! declare_interned_category {
($var_name:ident, $str_lit:literal) => { ... };
($var_name:ident, $str_lit:literal, extern) => { ... };
}Expand description
Statically declares a new InternedCategory.
By default, this macro allocates the category inside the special
__fxt_interned_category_table linker section.
If the extern parameter is provided, the macro instead references an external
symbol (e.g. C++ template-allocated) with the C++ mangled name for the category,
preventing duplicate physical allocation in the linker section.
ยงExamples
Local allocation:
declare_interned_category!(MY_CATEGORY, "kernel:sched");External reference (references C++ symbol, avoids physical duplicates):
declare_interned_category!(MY_CATEGORY, "kernel:meta", extern);