atomic_long..._dec_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… atomic_long_fetch_dec_acquire(9) β€” Kernel API Manual, bestie edition

okay so real talk, this is a kernel API manual page and the function is atomic_long_fetch_dec_acquire. Yes that name is a whole mouthful. Yes it's iconic. Let's get into it πŸ’–


✨ NAME ✨

atomic_long_fetch_dec_acquire β€” atomic decrement with acquire ordering πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

long atomic_long_fetch_dec_acquire (atomic_long_t *v );

🌸 ARGUMENTS 🌸

  • v β€” pointer to atomic_long_t. that's it, that's the whole vibe. she points, we decrement πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

So the way this works: it atomically updates v to (v - 1) with acquire ordering. all in one go, no race conditions, no drama, no cap. ✨

⚠️ Unsafe to use in noinstr code β€” use raw_atomic_long_fetch_dec_acquire there instead. fr fr, do not come for me if you ignore this one, that's the whole warning 🫢

πŸ‘‘ RETURN πŸ‘‘

The original value of v. not the new one. the before picture. she gives you the receipts of what it used to be πŸ“Έ


🌈 SEE ALSO 🌈

Kernel file ./include/linux/atomic/atomic-instrumented.h and honestly like,,, the entire atomic family. buckle up bestie, this is a long list but every single one of these is getting its moment πŸ’€

the atomic_* girlies:

the atomic64_* icons:

the atomic_long_* main characters (including our girl's whole friend group):


🧚 sign-off 🧚

this absolute banger of a page lives in the kernel file ./include/linux/atomic, dated October 2026, and yes it's giving documentation excellence πŸ’œ go forth and decrement responsibly, bestie 🫢✨

πŸ“¦ where this page comes from