__scx_cid_to_cpu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __scx_cid_to_cpu β€” the kernel API manual, but make it make sense

okay bestie, welcome to the __scx_cid_to_cpu(9) page β€” this is the kernel API manual and honestly it's a tiny one, so we'll be in and out, no cap πŸŽ€


✨ NAME ✨

__scx_cid_to_cpu β€” an unchecked cidβ†’cpu table lookup πŸ¦‹

like, the table lookup with zero vibe checks attached. she trusts you. that's the whole bit.


✨ SYNOPSIS ✨

s32 __scx_cid_to_cpu (s32 cid );

one arg, one s32 back, and it's literally that simple πŸ’…


✨ ARGUMENTS ✨

  • cid β€” the cid you're looking up πŸ“. Must be in [0, num_possible_cpus) β€” that range is not a suggestion, it's the rule, and nobody on this page is gonna re-check it for you bestie 😭

✨ DESCRIPTION ✨

so here's the tea πŸ«–: this one is intended for callsites that have already validated cid and that run on a live scheduler, which is what *guarantees the tables are published and stable** ✨

read that again, because it's doing a lot of heavy lifting:

  • you already validated cid yourself β†’ she's not redoing your homework πŸ™ˆ
  • you're on a live scheduler β†’ that's the guarantee that the tables are published and stable in the first place 🌸
⚠️ unchecked is right there in the name, queen. If you haven't validated cid or you're not on a live scheduler, this is not the function for you β€” the whole "tables are published and stable" deal is a promise you keep, not her. πŸ’€

it's giving main-character-for-internal-callsites energy, and honestly? iconic πŸ‘‘


✨ SEE ALSO ✨

all the siblings in ./kernel/sched/ext/cid.h β€” a whole little cid/cpu/cmasks friend group, fr fr 🧚:

iykyk πŸ’œ


and that's the whole page, bestie β€” slay, you're done 🌈

sign-off πŸŽ€ β€” this little masterpiece lives under ./kernel/sched/ext, and the page itself is dated October 2026. no cap, that's the version info and the date, right there at the bottom where the footer would've been 🫢

πŸ“¦ where this page comes from