percpu_ref_is_dying(9)
π¦ percpu_ref_is_dying(9) β the kernel API manual, but make it make sense π
okay so bestie, welcome to section 9 of the Kernel API Manual β yes, that's the kernel-API section, we love a numbered vibe. today's main character is percpu_ref_is_dying, and ngl she's a tiny little function who just wants to tell you the truth about a refcount. let's get into it β¨
πΈ NAME πΈ
percpu_ref_is_dying β test whether a percpu refcount is dying or dead
like... is she okay? is she on her way out? this function will tell you π
β¨ SYNOPSIS β¨
bool percpu_ref_is_dying (struct percpu_ref *ref );
yup, that's the whole thing. she returns a bool, she takes one pointer, she does not do small talk π«Ά
π ARGUMENTS π
refβ thepercpu_refyou want to test. that's it. that's the whole argument list. she's low maintenance π§
π DESCRIPTION π
Returns true if ref is dying or dead. π
fr fr, that's the whole read: you hand her a refcount, she hits you with the truth. alive-adjacent energy or true-because-she's-leaving energy. no in-between narrative, no lore drop.
β οΈ okay this part matters, bestie: this function is safe to call as long as ref is between init and exit β and the caller is responsible for synchronizing against state changes. that's on YOU, not her. don't come for her if you called it outside that window, she literally told you π
π SEE ALSO π
the whole percpu-refcount friend group, plus the kernel file they all live in:
Kernel file ./include/linux/percpu-refcount.h
percpu_ref_kill(9)percpu_ref_get_many(9)percpu_ref_get(9)percpu_ref_tryget_many(9)percpu_ref_tryget(9)percpu_ref_tryget_live_rcu(9)percpu_ref_tryget_live(9)percpu_ref_put_many(9)percpu_ref_put(9)
iykyk π
okay that's the page!! sourced straight from ./include/linux, dated October 2026, and yes β it's percpu_ref_is_dying(9) again at the bottom, because the footer said so and we respect the footer. mwah ππ
π¦ 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