cpufreq_set_cur_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cpufreq_set_cur_state(9) β€” a Kernel API Manual moment

okay so bestie, welcome to the <pink>Kernel API Manual</pink> entry for cpufreq_set_cur_state ✨ this is a <purple>section 9</purple> situation (kernel API, iykyk) and honestly it's giving "small function, big responsibilities."


🌸 NAME 🌸

cpufreq_set_cur_state β€” the callback function that sets the current cooling state 🧊✨


πŸ¦‹ SYNOPSIS πŸ¦‹

int cpufreq_set_cur_state (struct thermal_cooling_device *cdev ,
unsigned long state );

that's the whole vibe, no cap πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • cdev β€” a pointer to the thermal cooling device 🫢 like, the cooling device in question, bestie
  • state β€” set this variable to the current cooling state 🌑️ that's literally the whole assignment

πŸ‘‘ DESCRIPTION πŸ‘‘

so this is the callback for the thermal cooling device to change the cpufreq current cooling state πŸ”₯ it's the little handler that the thermal side calls when it wants the cpufreq cooling situation to move to a different state β€” iconic behavior, fr fr.


⭐ RETURN ⭐

0 on success πŸ’– and an <red>error code otherwise</red> 😭 (so like, check it, bestie, don't just assume success)


🌈 SEE ALSO 🌈

literally connected to everything, bestie. Kernel file ./drivers/thermal/cpufreq_cooling.c plus:

like I said. everyone knows everyone. it's a whole friend group πŸ’œ


🫢 quick reminder that this page lives at ./drivers/thermal β€” go read the source if you wanna be extra

and that's the whole page, bestie!! era: <yellow>October 2026</yellow> πŸ“ brought to you from the <mint>./drivers/thermal</mint> corner of the kernel, filed under cpufreq_set_cur_state(9) β€” slay, stay cool (literally), and see you in the next manpage πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from