STRUCT W1_FAMILY(9)
π struct w1_family(9) β the Kernel API Manual, but make it a group chat
okay so bestie, welcome to struct w1_family from the Kernel API Manual β¨ this is literally the reference counted family structure β say that five times fast. it's giving "small struct, big responsibilities" and honestly? we're obsessed. π
β¨ NAME β¨
struct w1_family β reference counted family structure. that's it, that's the whole vibe. π
πΈ SYNOPSIS πΈ
struct w1_family {
struct list_head family_entry;
u8 fid;
const struct w1_family_ops *fops;
const struct of_device_id *of_match_table;
atomic_t refcnt;
};
look at her. five fields. no notes. π
π¦ Members π¦
here's the member-by-member breakdown, no cap:
family_entryβ the family linked list. it's literally how this family hangs out with all the other families. main character in the list, honestly. π₯fidβ an 8 bit family identifier. eight whole bits. so tiny, so iconic. πfopsβ the operations for this family. this is where the β¨functionalityβ¨ lives, bestie. πof_match_tableβ the open firmware match table. yes, "open firmware," not "OF" like the slang β stay focused. πrefcntβ the reference counter. it's anatomic_t, so it's keeping track of who's holding on and how many. extremely responsible of her. π«Ά
β reminder:refcntisatomic_t, so like... don't go doing non-atomic shenanigans with it, iykyk.
π SEE ALSO π
- Kernel file
./include/linux/w1.h struct w1_reg_num(9)struct w1_slave(9)struct w1_bus_master(9)enum w1_master_flags(9)struct w1_master(9)struct w1_family_ops(9)module_w1_family(9)
go read those too, bestie, they're all part of the same friend group π β¨
and that's the whole page! π brought to you straight out of ./include/linux, dated October 2026 β so yeah, future energy, but make it kernel. stay slay, read your headers, and remember: every family needs a refcnt. periodt. ππ¦πΈ
π¦ 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