available_idle_cpu(9)
β¨ available_idle_cpu(9) β¨
okay so bestie, welcome to another episode of the Kernel API Manual π
this one's a lil function called available_idle_cpu and honestly? she's short, she's sweet, she's giving "one job and she does it" energy. π
πΈ NAME πΈ
available_idle_cpu β is a given CPU idle for enqueuing work. that's it, that's the whole vibe check π¦
β SYNOPSIS β
bool available_idle_cpu (int cpu );
literally just hand her a cpu and she'll hand you back a bool, no cap β¨
π ARGUMENTS π
cpuβ the CPU in question. like, the specific one you're being nosy about π just pass the int, she'll take it from there.
π₯ RETURN π₯
1β if the CPU is currently idle. she's free, she's available, she's not doing anything rn π0β otherwise. busy girl, try again later π
no in-between, no maybe, no "it's complicated" β just 1 or 0, periodt π
π SEE ALSO π
if you're the kind of person who falls down a rabbit hole (same), go peek at these cuties in the Kernel file ./kernel/sched/sched.h:
iykyk π§
and that's the whole page, bestie β no notes, she ate and left no crumbs π«Ά this lil beauty lives over in ./kernel/sched and she's dated October 2026, so mark your calendars and stan responsibly ππΈ
π¦ 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