trace_pid_list_next(9)
β¨ 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 throughpidβ the pid you start from π your little starting point, no capnextβ the pointer where the found pid gets placed, set starting frompidβ¨ 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:
trace_pid_list_is_set(9)trace_pid_list_set(9)trace_pid_list_clear(9)trace_pid_list_first(9)trace_pid_list_alloc(9)trace_pid_list_free(9)
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
- 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