available_idle_cpu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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