STRUCT COUNTER_ATTRIBUTE(9)
β¨ NAME β¨
struct counter_attribute β the Counter sysfs attribute, bestie π
(yes this is page struct counter_attribute(9) of the Kernel API Manual, we're getting into it π«Ά)
πΈ SYNOPSIS πΈ
struct counter_attribute {
struct device_attribute dev_attr;
struct list_head l;
struct counter_comp comp;
enum counter_scope scope;
void *parent;
};
okay so that's the whole shape of it, no cap β¨
π Members π
dev_attrβ the device attribute for sysfs. it's giving "this is how sysfs sees you" energy πlβ the node that adds the Counter attribute to the attribute group list. lowkey just the linked-list hookup πcompβ the Counter component callbacks and data. all the actual personality lives here βscopeβ the Counter scope of the attribute. typeenum counter_scope, fyi πparentβ a pointer to the parent component.void *, so it's mystery on purpose π
π¦ SEE ALSO π¦
- Kernel file
./drivers/counter/counter-sysfs.cstruct counter_attribute_group(9)counter_sysfs_add(9)
like, go read those too, they're literally the rest of the lore π§
k bye bestie, this page is from ./drivers/counter, dated October 2026, and honestly? iconic. slay ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms