idle_cpu_without(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… idle_cpu_without(9) β€” Kernel API Manual πŸŽ€

okay so bestie, welcome to idle_cpu_without, part of the Kernel API Manual ✨ this one's short and sweet but like, actually important, so pay attention 🫢


✨ NAME ✨

idle_cpu_without β€” would a given CPU be idle without p ? πŸ¦‹


✨ SYNOPSIS ✨

int idle_cpu_without (int cpu , struct task_struct *p );

that's it. that's the whole vibe check πŸ’…


✨ ARGUMENTS ✨

  • cpu β€” the processor on which idleness is tested. the CPU we're literally interrogating about its chill levels πŸ–₯️✨
  • p β€” task which should be ignored. like, pretend this task doesn't exist, bestie, it's not part of the equation πŸ™ˆ

✨ RETURN ✨

  • 1 if the CPU would be idle. slay, it's free πŸ’–
  • 0 otherwise. not idle, no cap πŸ’€

✨ SEE ALSO ✨

the Kernel file ./kernel/sched/fair.c + the whole friend group πŸ‘‘:


ngl this page is giving "small but mighty" energy β€” it's literally just one question: would this CPU be idle if we ignored p? one integer answer, 1 or 0, periodt. no sneaky side effects mentioned here, so don't go assuming any πŸ“

and that's a wrap, bestie 🌈 this gem lives in ./kernel/sched, it's dated October 2026, and it goes by idle_cpu_without(9) πŸ’œ mwah, go touch some scheduler code 🧚⭐

πŸ“¦ where this page comes from