get_level(9)
π get_level(9) β the kernel API manual, but make it cute
okay bestie so this is a page from the Kernel API Manual and it's literally about finding the level for a particular frequency. no cap, that's the whole vibe. it's giving "small function, big responsibility" energy and honestly? we love that for it. π
β¨ NAME β¨
get_level β find the level for a particular frequency πΈ
like, the whole point of this icon is that it maps a frequency to a level. periodt. π₯
π¦ SYNOPSIS π¦
unsigned long get_level (struct cpufreq_cooling_device *cpufreq_cdev ,
unsigned int freq );
that's it. that's the whole signature. copy it exactly, don't @ me. π
π ARGUMENTS π
cpufreq_cdevβ thecpufreq_cdevfor which the property is required. like, this is the device we're asking about, bestie. it has to be that one. πfreqβ the frequency. yep. the actual frequency. the thing we're getting the level for. no notes. π«Ά
β RETURN β
the level corresponding to the frequency. that's the answer, that's the tea, that's the whole point. π β¨
π SEE ALSO π
kernel file ./drivers/thermal/cpufreq_cooling.c, plus literally the whole friend group:
struct time_in_idle(9)π¦struct cpufreq_cooling_device(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_set_cur_state(9)π¦__cpufreq_cooling_register(9)π¦cpufreq_cooling_register(9)π¦of_cpufreq_cooling_register(9)π¦cpufreq_cooling_unregister(9)π¦
iykyk β if you know, you know. go read them all. ππ
quick vibe check: the source line points at ./drivers/thermal, and honestly that's where the magic happens. π§
and that's the page!! mwah π this cutie lives in the kernel's ./drivers/thermal directory, it's dated October 2026, and it belongs to the Kernel API Manual β get_level(9) forever, 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