atomic_long..._add_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ atomic_long..._add_acquire(9) πŸ¦‹

okay so welcome to the Kernel API Manual page for atomic_long_fetch_add_acquire β€” yes, the header says atomic_long..._add_acquire(9), and we are folding that manual-name energy right in here, bestie. This one is all about an atomic add that carries acquire ordering, and it is lowkey iconic if you need the original value back. πŸ’…


πŸ’– NAME πŸ’–

atomic_long_fetch_add_acquire β€” atomic add with acquire ordering ✨

πŸŽ€ SYNOPSIS πŸŽ€

long atomic_long_fetch_add_acquire (long i , atomic_long_t *v );

🌸 ARGUMENTS 🌸

  • i β€” long value to add
  • v β€” pointer to atomic_long_t

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the main character move: atomically updates v to (v + i) with acquire ordering. That's the whole bit β€” clean, atomic, and ordered. No cap. ✨

🚨 bestie, important: unsafe to use in noinstr code; use raw_atomic_long_fetch_add_acquire there instead. Like, do not ignore that one. πŸ’€

πŸ‘‘ RETURN πŸ‘‘

The original value of v β€” the before pic, not the glow-up result. πŸ’…

🌈 SEE ALSO 🌈

Kernel file: ./include/linux/atomic/atomic-instrumented.h β€” and the whole extended atomic family is pulling up, iykyk:

mwah πŸ’‹ and that's the whole page, bestie. source/version: ./include/linux/atomic β€” date: October 2026 β€” page: atomic_long..._add_acquire(9) β€” from the Kernel API Manual. 🫢

πŸ“¦ where this page comes from