scx_task_iter_next_locked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… scx_task_iter_next_locked β€” like, the Kernel API Manual page, but make it make sense

okay so bestie, welcome to scx_task_iter_next_locked, which is a <pink>Kernel API Manual</pink> entry, and yes it's a (9) page, so it's kernel-internal lore, not your friendly everyday command. grab a strawberry drink πŸ“ and let's get into it.


✨ NAME ✨

scx_task_iter_next_locked β€” next non-idle task, with its rq still locked πŸ”’

like, it hands you the next task that isn't just vibing doing nothing, and the runqueue lock is held the whole time. main character energy fr.


🌸 SYNOPSIS 🌸

struct task_struct * scx_task_iter_next_locked (struct scx_task_iter
*iter );

that's the whole signature, no cap. one argument, returns a struct task_struct *. πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • iter β€” the iterator you're walking. literally just the thing you pass in so it knows where you are in the walk. πŸšΆβ€β™€οΈ

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: this one visits the non-idle task, with its rq lock held. yes, held. the lock is on while you're looking at it, that's the whole point, that's the assignment. πŸ’…

it also lets callers say whether they'd like to filter out dead tasks β€” like, "no thanks, skip the dead ones" is a thing you can ask for. πŸ™ˆ for the full deets on that, go see scx_task_iter_start. it's giving "read the prequel first", iykyk.

ngl, if you skipped scx_task_iter_start, you're missing context. go read it. it's not a suggestion, it's a vibe check. ⭐

πŸ‘‘ SEE ALSO πŸ‘‘

buckle up bestie, this is the whole friend group. every single one of these is a (9) page, and yeah, I'm listing all of them, because they're all invited to the party 🫢

and if you wanna read the source yourself (respect, honestly πŸ‘‘), it lives in the kernel file ./kernel/sched/ext/ext.c.


okay that's the whole page, mwah πŸ’‹ this cutie lives under ./kernel/sched/ext and the manual's dated October 2026 β€” so yeah, she's fresh, she's current, she's timestamped. go forth and iterate, bestie πŸ¦‹βœ¨

πŸ“¦ where this page comes from