cpufreq_cpu_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay bestie, welcome to the Kernel API Manual page for cpufreq_cpu_get(9) β€” the one that returns the policy for a CPU and marks it as busy 🫢

🌸 SYNOPSIS 🌸

struct cpufreq_policy * cpufreq_cpu_get (unsigned int cpu );

πŸŽ€ ARGUMENTS πŸŽ€

  • cpu β€” the CPU you wanna find the policy for, no cap πŸ”₯

πŸ’… DESCRIPTION πŸ’…

So here's the vibe: cpufreq_cpu_get calls cpufreq_cpu_get_raw to obtain a cpufreq policy for cpu, and then it increments the kobject reference counter of that policy. It returns a valid policy on success, or NULL on failure 😭

The policy that comes back from this function has to be released with the help of cpufreq_cpu_put, so its kobject reference counter gets balanced properly. Like, do not ghost that release step β€” it's giving "mandatory balance check" for real πŸ’€

bestie reminder: cpufreq_cpu_put is the matching energy. get it, then put it. periodt πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹


byeee πŸ’– this lil page comes from ./drivers/cpufreq, dated October 2026, and it's cpufreq_cpu_get(9) in the Kernel API Manual β€” iconic, slay, etc. πŸŽ€βœ¨

πŸ“¦ where this page comes from