scx_for_each_descendant_pre(9)
πΈ 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 withscx_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
- 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