percpu_ref_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… percpu_ref_get

okay so bestie, welcome to the Kernel API Manual β€” we're talking about percpu_ref_get, and she's iconic for exactly one job: bumping a percpu refcount. no cap. 🫢


✨ NAME ✨

percpu_ref_get β€” increment a percpu refcount πŸ’–

🌸 SYNOPSIS 🌸

void percpu_ref_get (struct percpu_ref *ref );

πŸŽ€ ARGUMENTS πŸŽ€

  • ref β€” the percpu_ref to get, aka the cutie you're handing to this function. πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically this is analogous to atomic_long_inc β€” same energy, different refcount situation. ✨

Safety vibe check: it's safe to call this function as long as ref is between init and exit. That's the whole rule, bestie. Don't come for me if it's outside that window. πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/percpu-refcount.h, plus these other icons:


that's the whole page, periodt. this one lives in ./include/linux and is dated October 2026 β€” mwah πŸ’‹

πŸ“¦ where this page comes from