raw_atomic_l...tive_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… raw_atomic_l...tive_acquire(9) πŸ’…

okay bestie, welcome to the Kernel API Manual ✨ (yes the title in the header is literally abbreviated like that, it's giving cryptic but we move β€” the real full name is in NAME, i promise)


🌸 NAME 🌸

raw_atomic_long_add_negative_acquire β€” atomic add and test if negative with acquire ordering πŸ¦‹

like, you add stuff. atomically. then you check if the result went negative. with acquire ordering. that's the whole vibe.


⭐ SYNOPSIS ⭐

bool raw_atomic_long_add_negative_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 atomic_long_t πŸ‘‘ the actual thing getting updated

✨ DESCRIPTION ✨

Atomically updates v to (v + i) with acquire ordering. no cap, it does both in one shot πŸ”₯

Safe to use in noinstr code; prefer atomic_long_add_negative_acquire elsewhere. so like β€” if you're not in noinstr, why are you here? use the normal one. this one's the raw, lowkey-specialized variant. iykyk πŸ’…


🌈 RETURN 🌈

true if the resulting value of v is negative, false otherwise 🫢

literally just a yes/no on "did we go negative". iconic behavior honestly.


πŸ¦‹ SEE ALSO πŸ¦‹

the whole family tree fr fr, every single one:

Kernel file: ./include/linux/atomic/atomic-long.h πŸ“

πŸ’œ reads & sets

πŸ“ adds

🧚 subs

🌸 incs

πŸ¦‹ decs

πŸ”₯ bitwise besties

πŸ’€ exchanges & compare-exchanges

πŸ‘‘ tests & "unless" girlies


later bestie πŸ’œ this page lives in ./include/linux/atomic and it's dated October 2026 β€” yes, 2026, she's from the future, we don't ask questions. mwah 🫢✨

πŸ“¦ where this page comes from