atomic_long_add(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME

okay so bestie, this is atomic_long_add(9) from the Kernel API Manual, and it is literally the atomic add with relaxed ordering. The name is atomic_long_add β€” atomic add with relaxed ordering. slay. ✨


✨ SYNOPSIS

void atomic_long_add (long i , atomic_long_t *v );

πŸŽ€ ARGUMENTS

  • i β€” a long value to add. that's the number going in. πŸ“
  • v β€” pointer to atomic_long_t. yes, pointer, bestie, not the value itself. 🫢

πŸ¦‹ DESCRIPTION

Atomically updates v to (v + i) with relaxed ordering. that's the whole move: it adds i onto what v points at, atomically, and the ordering vibe is relaxed. πŸ’…

🚨 real talk: this is unsafe to use in noinstr code. if you're in noinstr land, use raw_atomic_long_add there instead. do not play yourself, fr fr. πŸ’€

🌸 RETURN

Nothing. like, literally nothing. no return value, no little bonus, no secret treat. periodt. πŸŽ€

πŸ’… SEE ALSO

Kernel file: ./include/linux/atomic/atomic-instrumented.h β€” that's the lore drop. and here's the whole atomic guest list, no skips, no cuts, in order:


cute sign-off: this page lives in ./include/linux/atomic, dated October 2026, and yes, it's literally atomic_long_add(9). bye bestie, go add your long atomically πŸ’…πŸ’–

πŸ“¦ where this page comes from