atomic_long_...tive_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the atomic_long_add_negative_acquire(9) page from the Kernel API Manual β€” yes, the manual name is folded in near the top, we're doing this right. πŸ’–

✨ NAME ✨

atomic_long_add_negative_acquire β€” the atomic add-and-test-if-negative situation, but with acquire ordering. That's the vibe. πŸŽ€

✨ SYNOPSIS ✨

Here's the signature, copy it exactly, do not freestyle it:

bool atomic_long_add_negative_acquire (long i , atomic_long_t *v );

✨ ARGUMENTS ✨

  • i β€” the long value you're adding. It's literally the amount going into the add. πŸ“
  • v β€” pointer to atomic_long_t, aka the atomic thing getting updated. 🫢

✨ DESCRIPTION ✨

okay so this function atomically updates v to (v + i) with acquire ordering. That's the whole mechanical bit, and it is lowkey iconic. ✨

⚠️ Big caution: it is unsafe to use in noinstr code. In noinstr code, use raw_atomic_long_add_negative_acquire instead. No cap, that's the rule. πŸ’€

✨ RETURN ✨

true if the resulting value of v is negative; false otherwise. That's it. The function is not subtle, she just tells you if the post-add result is negative. 🌈

✨ SEE ALSO ✨

Kernel file ./include/linux/atomic/atomic-instrumented.h β€” that's the home base. 🏠


πŸ’– source: ./include/linux/atomic β€’ date: October 2026 β€’ page: atomic_long_...tive_acquire(9) β€” byeee, go forth and add negatively with acquire ordering, bestie! πŸ’…βœ¨

πŸ“¦ where this page comes from