scx_for_each_descendant_pre(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so bestie, gather round β€” scx_for_each_descendant_pre is literally a pre-order walk of a sched's descendants ✨ like that's the whole vibe, it walks the fam tree, no cap


πŸŽ€ SYNOPSIS πŸŽ€

scx_for_each_descendant_pre (pos , root );

that's it, that's the whole call, she's cute and she's compact πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • pos β€” the iteration cursor, aka your little pointer bestie that keeps track of where we're at in the walk 🫢
  • root β€” the sched whose descendants we're walking, the main character of this whole operation πŸ‘‘

πŸ”₯ DESCRIPTION πŸ”₯

So we're walking root's descendants πŸšΆβ€β™€οΈβœ¨ and here's the important part β€” root is included in the iteration and it's the first node to be visited, periodt πŸ’€ she does not get skipped, she's first in line, main character energy fr fr

⚠️ okay listen up because this one matters: you must call this with scx_enable_mutex, scx_sched_lock, or RCU read lock πŸ”’ no exceptions, no "but bestie I forgot", just hold one of those locks or the whole thing is gonna have a bad time 😭

πŸ’œ SEE ALSO πŸ’œ

  • Kernel file ./kernel/sched/ext/sub.h β€” go read it, iykyk πŸ“–
  • scx_missing_caps(9) β€” also on the reading list bestie 🌈

and that's the page !! source is ./kernel/sched/ext, dated October 2026, and if you ever need to find her again she goes by scx_for_each_descendant_pre(9) πŸŽ€βœ¨ mwah, go hold that lock πŸ’–

πŸ“¦ where this page comes from