__cpuidle_get_cpu_driver(9)
π __cpuidle_get_cpu_driver(9) β the Kernel API Manual, bestie edition π
okay so welcome to the <pink>__cpuidle_get_cpu_driver</pink> page, straight out of the Kernel API Manual. it's short, it's sweet, and it's literally just "gimme the driver pointer." let's get into it β¨
β¨ NAME β¨
__cpuidle_get_cpu_driver β return the global cpuidle driver pointer. that's the whole job. no cap π«Ά
πΈ SYNOPSIS πΈ
struct cpuidle_driver * __cpuidle_get_cpu_driver (int cpu );
so you call it with an int cpu, and it hands you back a struct cpuidle_driver *. simple as that, babe π
π¦ ARGUMENTS π¦
cpuβ lowkey ignored unless you've got the multiple driver support going on. otherwise it's just... there. sitting pretty. doing nothing π
β DESCRIPTION β
it returns a pointer to a struct cpuidle_driver object. and if no driver was previously registered? you get NULL. that's it, that's the whole vibe check π
like, <mint>the way that</mint> this function is just a getter and refuses to elaborate? main character energy fr fr. π
heads up bestie: NULL is a real possible return here, so don't go dereferencing it without checking. no thoughts head empty = segfault city π
π SEE ALSO π
kernel file ./drivers/cpuidle/driver.c β go read it, iykyk π
then the whole friend group:
__cpuidle_unset_driver(9)__cpuidle_set_driver(9)__cpuidle_set_driver(9)β yes it's listed twice, and honestly? iconic of them π__cpuidle_unset_driver(9)β also twice. we love a consistent queen β¨cpuidle_setup_broadcast_timer(9)__cpuidle_driver_init(9)__cpuidle_register_driver(9)__cpuidle_unregister_driver(9)cpuidle_register_driver(9)cpuidle_unregister_driver(9)cpuidle_get_driver(9)cpuidle_get_cpu_driver(9)cpuidle_driver_state_disabled(9)
and that's the page, bestie π this little gem lives in ./drivers/cpuidle, and the manual's dated October 2026 β so go forth, get your driver pointer, and slay ππ§ββοΈ
π¦ 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