pm_runtime_active(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ pm_runtime_active β€” the kernel API manual, but make it make sense ✨

okay so bestie, you're in the pm_runtime_active(9) page of the Kernel API Manual and honestly? it's a short one, we love a low-effort icon πŸ’… let's get into it.


πŸŽ€ NAME πŸŽ€

pm_runtime_active β€” literally just checks whether a device is runtime-active. that's it. that's the whole job.


πŸ¦‹ SYNOPSIS πŸ¦‹

bool pm_runtime_active (struct device *dev );

yes she returns a bool, she takes one pointer, she's lowkey iconic for how simple she is ✨


🌸 ARGUMENTS 🌸

  • dev β€” the target device. the one you're side-eyeing. the main character of this whole function, fr fr 🫢

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea: this one returns true if runtime PM is disabled for dev, OR if its runtime PM status is RPM_ACTIVE. anything else? false. periodt πŸ’€

⚠️ now this is the important part, don't scroll past it: the return value of this function can only be trusted if you call it under the runtime PM lock of dev, OR under conditions where runtime PM can't be either disabled or enabled for dev and its runtime PM status cannot change. like, that's the whole vibe check on whether the answer means anything. no cap. if neither of those is true, the answer is giving "made up" 😭

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/pm_runtime.h and the whole extended universe of runtime PM friends β€” go read these next, iykyk:


🌈 and that's the whole page, bestie!! this one lives at ./include/linux in the kernel tree, dated October 2026, so go be careful with your locks and stay hydrated πŸ’œπŸ§š

πŸ“¦ where this page comes from