cpuidle_register_driver(9)
π cpuidle_register_driver(9) π
okay so bestie, welcome to another page of the Kernel API Manual β this one's a little kernel function called cpuidle_register_driver, and honestly? it's giving "small but mighty" β¨
πΈ NAME πΈ
cpuidle_register_driver β registers a driver π
β¨ SYNOPSIS β¨
int cpuidle_register_driver (struct cpuidle_driver *drv );
like, that's the whole signature. short king π
π¦ ARGUMENTS π¦
drvβ a pointer to a validstruct cpuidle_driverπ bestie it must be valid, okay? don't be out here passing nonsense.
π DESCRIPTION π
So what does it do? It registers the driver under a lock π β and the reason is lowkey iconic: that lock exists to prevent concurrent attempts to [un]register the driver from happening at the same time. no chaotic group-chat crossover energy here, one at a time please π«Ά
It returns 0 on success π β and if things don't slay, it returns a negative error code (the one returned by __cpuidle_register_driver) π so yeah, check your return value, fr fr.
π SEE ALSO π
Kernel file ./drivers/cpuidle/driver.c β plus the whole friend group, in the order the page gives them:
__cpuidle_get_cpu_driver(9)__cpuidle_unset_driver(9)__cpuidle_set_driver(9)__cpuidle_get_cpu_driver(9)__cpuidle_set_driver(9)__cpuidle_unset_driver(9)cpuidle_setup_broadcast_timer(9)__cpuidle_driver_init(9)__cpuidle_register_driver(9)__cpuidle_unregister_driver(9)cpuidle_unregister_driver(9)cpuidle_get_driver(9)cpuidle_get_cpu_driver(9)cpuidle_driver_state_disabled(9)
(yes, some of them are listed twice β that's literally what the page says, so I'm not touching it, iykyk π)
anyway that's the whole vibe π« this little page lives in ./drivers/cpuidle, and it's dated October 2026 β so like, future girlie energy fr. bye bestie, go register that driver 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