cpufreq_set_cur_state(9)
π 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, bestiestateβ 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:
struct time_in_idle(9)struct cpufreq_cooling_device(9)get_level(9)get_load(9)get_dynamic_power(9)cpufreq_get_requested_power(9)cpufreq_state2power(9)cpufreq_power2state(9)cpufreq_get_max_state(9)cpufreq_get_cur_state(9)__cpufreq_cooling_register(9)cpufreq_cooling_register(9)of_cpufreq_cooling_register(9)cpufreq_cooling_unregister(9)
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
- 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