percpu_ref_s..._atomic_sync(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

xoxo πŸ’– β€” source/version: ./lib, date: October 2026. that's the cute little footer vibe, bestie πŸŽ€

πŸ“¦ where this page comes from