raw_atomic_..._add_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

raw_atomic_..._add_acquire(9) πŸ’…βœ¨

okay bestie, welcome to the Kernel API Manual β€” this page is about raw_atomic_long_fetch_add_acquire, and yes the header is doing that raw_atomic_..._add_acquire(9) abbreviation thing. it's giving β€œlong function name, tiny header,” but we move. 🫢


πŸ’– NAME πŸ’–

raw_atomic_long_fetch_add_acquire β€” atomic add with acquire ordering. periodt.


✨ SYNOPSIS ✨

long raw_atomic_long_fetch_add_acquire (long i , atomic_long_t *v );

πŸŽ€ ARGUMENTS πŸŽ€

  • i β€” the long value you're adding. that's it. that's the number.
  • v β€” pointer to the atomic_long_t that's getting updated. handle with care, queen. πŸ‘‘

🌸 DESCRIPTION 🌸

okay so the whole move: atomically updates v to (v + i) with acquire ordering. that's the core. no cap.

also important, bestie: this one is safe to use in noinstr code. but outside of that? the page says prefer atomic_long_fetch_add_acquire elsewhere. so use this raw one where the noinstr vibe fits, and reach for the other one for regular life. iykyk. πŸ’…


⭐ RETURN ⭐

the original value of v β€” meaning the value from before the update, not the new sum. iconic. 🫢


🌈 SEE ALSO 🌈


k bye bestie 🫢 β€” source/version: ./include/linux/atomic, date: October 2026. mwah πŸ’‹

πŸ“¦ where this page comes from