struct_group(9)
β¨ NAME β¨
struct_group β wrap a set of declarations in a mirrored struct. This is the struct_group(9) manual page, bestie π
π SYNOPSIS π
struct_group (NAME , MEMBERS... );
π ARGUMENTS π
NAMEβ the identifier name of the mirrored sub-struct. Like, the name-name for the named twin π«ΆMEMBERSβ the member declarations for the mirrored structs. All the little struct members go here β¨
π¦ DESCRIPTION π¦
Okay so the whole vibe: this is used to create an anonymous union of two structs with identical layout and size β one anonymous and one named. The former can be used normally without sub-struct naming, and the latter can be used to reason about the start, end, and size of the group of struct members. No cap, that's the entire tea π
πΈ SEE ALSO πΈ
Kernel file ./include/linux/stddef.h β and also these iconic little references:
sizeof_field(9)offsetofend(9)struct_group_attr(9)struct_group_tagged(9)DECLARE_FLEX_ARRAY(9)__TRAILING_OVERLAP(9)TRAILING_OVERLAP(9)
mwah π this page is sourced/versioned from ./include/linux and dated October 2026 β stay iconic, bestie π«Άπ
π¦ 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