percpu_ref_is_dying(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ 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 β€” the percpu_ref you 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

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