raw_atomic_f..._inc_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… raw_atomic_f..._inc_acquire β€” from the Kernel API Manual, bestie πŸ’…

okay so picture this: it's giving concurrency, it's giving ✨atomicity✨, and it's straight out of the Kernel API Manual. The page you're on is raw_atomic_f..._inc_acquire(9) and honestly? she's a tiny little legend. Let's get into it 🫢


✨ NAME ✨

raw_atomic_fetch_inc_acquire β€” atomic increment with acquire ordering πŸ”₯


🌸 SYNOPSIS 🌸

int raw_atomic_fetch_inc_acquire (atomic_t *v );

πŸŽ€ ARGUMENTS πŸŽ€

  • v β€” pointer to atomic_t. that's it, that's the whole argument. she's low maintenance πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the whole vibe: she atomically updates v to (v + 1) with acquire ordering. no cap, the "atomic" part is doing a LOT of heavy lifting there β€” nobody's gonna catch her mid-update, periodt πŸ’€

She's also safe to use in noinstr code β€” that's her whole personality trait, iykyk. But hear me out: prefer atomic_fetch_inc_acquire elsewhere. Like, she's the raw/unfiltered version, and the raw version is for the special cases only. outside of noinstr code, go pick up the regular one, bestie, she's right there 🧚


πŸ’– RETURN πŸ’–

The original value of v. ⭐

Not the new one β€” the original one. The before-picture. The value v had before she did her little +1. main character energy for a return value ngl πŸ‘‘


🌈 SEE ALSO 🌈

the source of truth is literally sitting here, go look:

  • Kernel file ./include/linux/atomic/atomic-arch-fallback.h

and now, the friend group. everyone showed up. literally πŸ’œ

πŸ“ the raw_atomic girlies (32-bit, iconic)

πŸ’€ the raw_atomic64 remix album (same energy, bigger numbers)

like, that's the whole family reunion and everyone ate, no crumbs left πŸ“

okay that's the whole page, bestie!! mwah πŸ’‹ this one lives in ./include/linux/atomic and it's dated October 2026 β€” go forth and increment atomically, you've got this πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from