raw_atomic_f..._dec_release(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to raw_atomic_f..._dec_release(9) from the Kernel API Manual β€” yes, the title is giving, and no, we are not skipping a single detail. 🫢

🌸 NAME 🌸

raw_atomic_fetch_dec_release β€” atomic decrement with release ordering. that's the name, that's the vibe, and it is literally giving β€œdecrement, but make it release-ordered” ✨

πŸŽ€ SYNOPSIS πŸŽ€

the signature, untouched, because we respect the code:

int raw_atomic_fetch_dec_release (atomic_t *v );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • v β€” pointer to atomic_t. that's the argument, that's the assignment, and yes it's the atomic variable getting the little minus-one moment πŸ’–

✨ DESCRIPTION ✨

okay so the actual move: it atomically updates v to (v - 1) with release ordering. no cap, that's the whole operation. πŸ”₯

πŸ’‘ safety note bestie: it's safe to use in noinstr code; prefer atomic_fetch_dec_release elsewhere. that's not me being dramatic, that's the actual guidance. 🌈

πŸ‘‘ RETURN πŸ‘‘

it gives you back the original value of v β€” the before picture, not the after. periodt. πŸ’…

🌈 SEE ALSO 🌈

kernel file lore: ./include/linux/atomic/atomic-arch-fallback.h β€” that's the file reference, and we're keeping it exactly. πŸŽ€

and now the whole atomic friend group, because nobody gets left out:


sign-off vibe check: source/version is ./include/linux/atomic, the date is October 2026, and the page is raw_atomic_f..._dec_release(9). mwah, take care of your atomics bestie πŸ’‹πŸ’–

πŸ“¦ where this page comes from