raw_atomic64..._dec_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… raw_atomic64_fetch_dec_acquire β€” from the Kernel API Manual ✨

okay bestie, welcome to the Kernel API Manual πŸŽ€ and to the most specific little function ever. This one's a baddie that does exactly one thing and does it atomically. iykyk πŸ’–


✨ NAME ✨

raw_atomic64_fetch_dec_acquire β€” atomic decrement with acquire ordering πŸ¦‹


🌸 SYNOPSIS 🌸

s64 raw_atomic64_fetch_dec_acquire (atomic64_t *v );

no cap, that's the whole vibe check. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • v β€” pointer to atomic64_t πŸ’« (yes bestie, it's a pointer, it's always a pointer)

πŸ‘‘ DESCRIPTION πŸ‘‘

So what does it actually do? It atomically updates v to (v - 1) with acquire ordering πŸ”₯ β€” like, one clean swoop, no half-decrements, no chaos, main character energy only.

It's safe to use in noinstr code πŸ’… β€” that's literally its whole personality. But elsewhere? Prefer atomic64_fetch_dec_acquire. She's the upgraded version for regular contexts, fr fr.


🌈 RETURN 🌈

The original value of v 🫢 β€” the value from before the decrement, not after. So you get the 411 on what it used to be. iconic.


πŸ’œ SEE ALSO πŸ’œ

the whole friend group πŸ’– β€” here's every single one, no gatekeeping:


and that's the whole page bestie, ily, go decrement something atomically πŸ’œπŸ¦‹

sign-off tea β˜•: this one came out of ./include/linux/atomic and it's dated October 2026 β€” periodt. πŸŽ€βœ¨
πŸ“¦ where this page comes from