percpu_ref_s..._atomic_sync(9)
β¨ NAME β¨
okay bestie, you're reading the Kernel API Manual entry for percpu_ref_switch_to_atomic_sync π
β its whole job is to switch a percpu_ref to atomic mode. that's it, that's the vibe. slay.
π¦ SYNOPSIS π¦
void percpu_ref_switch_to_atomic_sync (struct percpu_ref *ref );
π ARGUMENTS π
refβ thepercpu_refyou want to switch to atomic mode. hand it over, bestie π«Ά
πΈ DESCRIPTION πΈ
so this function schedules the switch of ref over to atomic mode, and then it waits for the switch to complete. yes, it actually waits β no βfire and forgetβ energy here, it's giving synchronous mode-switch realness β¨.
Caller responsibility, no cap: you must ensure that no other thread will switch back to percpu mode. like, that's your job, not this function's job. do not let another thread come through and flip it back to percpu mode while you're doing this β that is the rule, periodt π.
π SEE ALSO π
Kernel file ./lib/percpu-refcount.c β go look, iykyk π
percpu_ref_init(9)percpu_ref_exit(9)percpu_ref_switch_to_atomic(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)
xoxo π β source/version: ./lib, date: October 2026. that's the cute little footer vibe, 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