scx_cpu_valid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the Kernel API Manual page for scx_cpu_valid(9) ✨ this is where we give a cpu number the vibe check before trusting it on ops input args πŸ’…

🌸 NAME 🌸

scx_cpu_valid β€” verify a cpu number, to be used on ops input args. that’s the name, short and iconic πŸŽ€

✨ SYNOPSIS ✨

here’s the exact signature, bestie, no cap:

bool scx_cpu_valid (struct scx_sched *sch , s32 cpu , const char *where
);

πŸŽ€ ARGUMENTS πŸŽ€

  • sch β€” the scx_sched to abort on error. like, if things go bad, this is the scheduler that gets the dramatic exit 😭
  • cpu β€” a cpu number which came from a BPF ops. it can be any value, so do not assume it’s valid just because it showed up πŸ’€
  • where β€” extra information reported on error. it’s the little β€œhey, this is where it went wrong” note 🫢

πŸ’… DESCRIPTION πŸ’…

okay so cpu is a cpu number which came from the BPF scheduler and can be any value. fr fr, any value. so this function verifies that it is in range and one of the possible cpus. if invalid, it triggers an ops error. that’s literally the whole glow-up: range check + possible-cpus check, or ops error πŸ’₯

πŸ¦‹ SEE ALSO πŸ¦‹

the cross-reference group chat is huge and I’m obsessed. here’s every single one, bestie, plus the kernel file:


mwah πŸ’– source/version: ./kernel/sched/ext; date: October 2026; manual: scx_cpu_valid(9). bye bestie, go validate those cpus πŸŽ€βœ¨

πŸ“¦ where this page comes from