scx_bpf_task_cid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, welcome to scx_bpf_task_cid(9) β€” your Kernel API Manual moment. This one tells you the cid a task is currently associated with. lowkey simple, highkey useful, no cap. 🫢

✨ SYNOPSIS ✨

__bpf_kfunc s32 scx_bpf_task_cid (const struct task_struct *p );

πŸŽ€ ARGUMENTS πŸŽ€

  • p β€” task of interest. that’s the task you’re asking about, bestie πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

It’s the cid-addressed equivalent of scx_bpf_task_cpu. Since task_cpu(p) is always a valid cpu, this is just a table lookup β€” literally, that’s the whole vibe. 🌸

Heads up: it returns -EINVAL if called before any scheduler has ever published its cid tables. so if nobody’s published the cid tables yet, you get -EINVAL, periodt. 😭

🌈 SEE ALSO 🌈

The kernel file is ./kernel/sched/ext/ext.c, and here’s the whole linked-reference friend group, exactly as listed β€” no cap, every single one: 😀

later bestie πŸ’– β€” this page comes from ./kernel/sched/ext, dated October 2026, and it’s all scx_bpf_task_cid(9) energy. slay. πŸ‘‘

πŸ“¦ where this page comes from