__cacheline...egin_aligned(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ __cacheline...egin_aligned(9) πŸ¦‹

okay bestie, welcome to the Kernel API Manual corner where we’re reading the page for __cacheline_group_begin_aligned. it’s giving β€œtiny but important struct alignment moment” and we’re gonna get into it, no cap. πŸ’…


🌸 NAME 🌸

__cacheline_group_begin_aligned β€” declare an aligned group start. periodt.

✨ SYNOPSIS ✨

__cacheline_group_begin_aligned (GROUP , ... );

πŸŽ€ ARGUMENTS πŸŽ€

  • GROUP β€” name of the group. that’s the group’s whole identity rn.
  • ... β€” optional group alignment. yes bestie, optional, she can vibe with or without it.

πŸ’– DESCRIPTION πŸ’–

ok so the following block inside a struct:

__cacheline_group_begin_aligned(grp); field a; field b;
__cacheline_group_end_aligned(grp);

will always be aligned to either the specified alignment or SMP_CACHE_BYTES. that’s the whole tea. β˜•βœ¨

πŸ‘€ SEE ALSO πŸ‘€


muah πŸ’‹ this little page lives in ./include/linux, dated October 2026, and the footer title is still __cacheline...egin_aligned(9) β€” source/version and date sign-off, bestie, we love a consistent icon. πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from