percpu_ref_exit(9)
β¨ NAME β¨
percpu_ref_exit β the undo button for percpu_ref_init(), straight from the Kernel API Manual π
π οΈ SYNOPSIS π οΈ
void percpu_ref_exit (struct percpu_ref *ref );
π ARGUMENTS π
refβ thepercpu_refyou want to exit, bestie. Thatβs the one getting undone here π«Ά
πΈ DESCRIPTION πΈ
Okay so this function exits ref. Literally what it says on the tin β¨
The caller is responsible for ensuring that ref is no longer in active use. No cap, that part is on you β make sure itβs actually done being used before you call this π
The usual places to invoke this function from are:
- the
ref->releasecallback, or - in the init failure path where
percpu_ref_initsucceeded but other parts of the initialization of the embedding object failed.
Thatβs the vibe: cleanup when the ref is done, or cleanup when the rest of your setup didnβt make it π
π¦ SEE ALSO π¦
Kernel file ./lib/percpu-refcount.c
percpu_ref_init(9)percpu_ref_switch_to_atomic(9)percpu_ref_switch_to_atomic_sync(9)percpu_ref_switch_to_percpu(9)percpu_ref_kill_and_confirm(9)percpu_ref_is_zero(9)percpu_ref_reinit(9)percpu_ref_resurrect(9)
source/version ./lib, date October 2026, page percpu_ref_exit(9) β catch u later, bye bestie ππ
π¦ 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