__scx_cid_to_cpu(9)
π
__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
cidyourself β 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 πΈ
β οΈuncheckedis right there in the name, queen. If you haven't validatedcidor 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 π§:
cid_valid(9)__scx_cpu_to_cid(9)scx_cid_to_cpu(9)scx_cpu_to_cid(9)scx_is_cid_type(9)__scx_cmask_init(9)scx_cmask_init(9)scx_cmask_reframe(9)scx_cmask_test(9)scx_cmask_for_each_cid(9)
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
- 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