css_for_each...cendant_post(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… css_for_each_descendant_post β€” NAME ✨

ok so bestie, css_for_each_descendant_post is literally the post-order walk of a css's descendants πŸ¦‹ like that's the whole vibe, that's the function.

(this whole page lives in the Kernel API Manual, and honestly? iconic of it.)


🌸 SYNOPSIS 🌸

css_for_each_descendant_post (pos , css );

two args, no drama, we move πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • pos β€” the css * that you use as the loop cursor. it's the little pointer that goes scoot-scoot-scooting along your walk, tracking where you are πŸ‘‘
  • css β€” the css whose descendants you wanna walk. this is your main character, your starting point, your root 🫢

πŸ”₯ DESCRIPTION πŸ”₯

okay so it's basically the sibling of css_for_each_descendant_pre β€” same energy β€” except this one does a post-order traversal instead of pre-order. so instead of hitting the parent first and then the kids, you go down and then come back up, and the root is included in the iteration… and it's the last node to be visited, not the first. it's giving "save the best for last" ngl 😭

now for the part that actually matters, the visibility lore:

  • if a subsystem synchronizes ->css_online and the start of iteration, then a css which finished ->css_online is guaranteed to be visible in the future iterations β€” and it'll stay visible until the last reference is put. no cap, it's locked in πŸ’–
  • a css which hasn't finished ->css_online, or one that already finished ->css_offline, may show up during traversal. like it might just… appear πŸ™ˆ rude but real.
  • and it's each subsystem's responsibility to synchronize against on/offlining. that's on you bestie, the walker is not gonna do it for you πŸ’€
⚠️ also pls note: the walk visibility guarantee example described in the pre-order walk does not apply the same to post-order walks. so don't go assuming pre-order rules transfer over β€” they do not, and that's the tea πŸ“

🌈 SEE ALSO 🌈

Kernel file ./include/linux/cgroup.h, plus the whole friend group:


and that's the page bestie, go forth and traverse πŸ’œ

sign-off era: this one's from ./include/linux, dated October 2026, and it's filed under css_for_each...cendant_post(9) β€” mwah, slay, periodt πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from