STRUCT KSET(9)
π struct kset(9) β the Kernel API Manual, but make it make sense
okay so bestie, this is struct kset(9) β the manual page for ksets, straight out of the Kernel API Manual. grab a snack, we're learning kernel object groups π
β¨ NAME β¨
struct kset β literally a set of kobjects of a specific type, all belonging to a specific subsystem. that's the whole vibe. a friend group, but for kernel objects π«Ά
πΈ SYNOPSIS πΈ
struct kset {
struct list_head list;
spinlock_t list_lock;
struct kobject kobj;
const struct kset_uevent_ops *uevent_ops;
};
no cap, that's the whole struct. now let's meet the members π
π Members π
listβ the list of all kobjects for this kset. it's giving roster, it's giving guest list, it's giving everyone's here πlist_lockβ a lock for iterating over the kobjects. protect your iteration, bestie, do not skip this πkobjβ the embedded kobject for this kset. and yes, it's recursion, isn't it funβ¦ π (the manual said it, not me)uevent_opsβ the set of uevent operations for this kset. these get called whenever a kobject has something happen to it, so that the kset can add new environment variables, or filter out the uevents if so desired. main character energy honestly, it gets a say in everything π
π Description π
so a kset defines a group of kobjects. they can be individually different "types", but overall these kobjects all want to be grouped together and operated on in the same manner. like, different majors, same dorm, ykwim? π
ksets are used to define the attribute callbacks and other common events that happen to a kobject. that's their whole job and they ate, no notes β¨
π₯ SEE ALSO π₯
- Kernel file
./include/linux/kobject.hβ go read it, iykyk π
fr fr: every field above is load-bearing. don't go removing list_lock because it "looked optional." that's not a vibe check you wanna fail π
and that's the page, bestie π¦ this one's from ./include/linux, dated October 2026 β mwah, iconic, 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