trace_pid_list_next(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ trace_pid_list_next(9) ✨

okay so bestie, we're deep in the Kernel API Manual today and this one is literally the "who's next tho" of pid lists πŸ’…

🌸 NAME 🌸

trace_pid_list_next β€” return the next pid in the list 🫢

πŸŽ€ SYNOPSIS πŸŽ€

int trace_pid_list_next (struct trace_pid_list *pid_list , unsigned int
pid , unsigned int *next );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • pid_list β€” the pid list we're gonna examine πŸ‘€ like, this is the whole vibe we're searching through
  • pid β€” the pid you start from 🏁 your little starting point, no cap
  • next β€” the pointer where the found pid gets placed, set starting from pid ✨ this is where the answer goes

πŸ’– DESCRIPTION πŸ’–

So the way this works: it looks for the next consecutive pid that's in pid_list, starting at the pid you specified with pid. If one is set (including pid itself, yes queen, it counts πŸ’…), then that pid gets placed into next.

Return 0 when a pid is found πŸŽ‰ and -1 if there are no more pids included 😭 that's it, that's the whole vibe check.

ngl the -1 is not an error, it's just the "we're out of pids bestie" signal, so don't panic πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./kernel/trace/pid_list.c and the rest of the squad:


and that's the page πŸ’– brought to you by ./kernel/trace, living its best October 2026 life β€” slay, icon, periodt πŸ‘‘βœ¨

πŸ“¦ where this page comes from