__cpuidle_set_driver(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ __cpuidle_set_driver(9) ✨

okay so bestie, welcome to the Kernel API Manual β€” this one's a lil kernel-internals baddie called __cpuidle_set_driver, and honestly? she's short but she matters. πŸ’…


πŸŽ€ NAME πŸŽ€

__cpuidle_set_driver β€” assigns the global cpuidle driver variable. that's it. that's the whole gig. lowkey iconic for how straightforward it is 🫢


🌸 SYNOPSIS 🌸

int __cpuidle_set_driver (struct cpuidle_driver *drv );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • drv β€” a pointer to a struct cpuidle_driver object. yes queen, that's the one you're handing over to the global variable πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

so like, the whole vibe: it returns 0 on success. slay. ✨

but heads up β€” if the driver is already registered, you get -EBUSY. it's giving "ma'am this seat is taken". not an error you did wrong, just the driver's already clocked in and the global variable's not about to have two mains characters 😭

no cap: 0 = we ate. -EBUSY = already registered, back off gently πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./drivers/cpuidle/driver.c, plus the whole friend group:

(and yes, __cpuidle_get_cpu_driver(9), __cpuidle_unset_driver(9) are in there twice β€” that's how the original rolls, we don't edit the guest list πŸ’œ)


anyway that's the whole page bestie, short and sweet, fr fr πŸ“

mwah πŸ’‹ β€” brought to you from ./drivers/cpuidle, dated October 2026, still __cpuidle_set_driver(9) and still serving looks πŸ‘‘

πŸ“¦ where this page comes from