STRUCT COUNTER_ATTRIBUTE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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. type enum 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.c struct
  • 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