raw_atomic_...turn_release(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay so bestie, this page is for raw_atomic_dec_return_release β€” the atomic decrement with release ordering. that's the whole vibe. ✨

this is a Kernel API Manual entry, so like… kernel girlies, this one's for you 🫢


🌸 SYNOPSIS 🌸

int raw_atomic_dec_return_release (atomic_t *v );

literally that's it. one function, one pointer, iconic behavior πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • v β€” pointer to atomic_t. yeah. a pointer. to an atomic_t. she's giving "just hand me the address and I'll do the rest" energy πŸ’…

✨ DESCRIPTION ✨

okay listen. raw_atomic_dec_return_release atomically updates v to (v - 1) with release ordering. atomically means nobody can catch her mid-decrement β€” it happens all at once, no cap. πŸ”₯ and release ordering means the memory ordering is baked in, so you don't gotta sprinkle barriers around like confetti.

she is safe to use in noinstr code β€” which, iykyk, is a whole special zone where you can't just call whatever you want. so if you're in there, she's your girl πŸ’–

but fr fr: prefer atomic_dec_return_release elsewhere. the raw_ ones are the lowkey backstage version; the non-raw_ one is what you want in normal-people code. periodt.

⭐ RETURN ⭐

she returns the updated value of v. like, the after value. the post-decrement number. she's a giver, she tells you what it became 🎁


πŸ¦‹ SEE ALSO πŸ¦‹

okay the squad is LARGE. this is the whole group chat. don't @ me, just scroll πŸ‘‡

first, the file she lives in:

  • Kernel file ./include/linux/atomic/atomic-arch-fallback.h πŸ“

and now… everyone else:

like… she has a LOT of sisters. all iconic. all atomic. πŸ’œ


okay that's the page!! mwah πŸ’‹ this one came out of ./include/linux/atomic and it's dated October 2026 β€” remember us fondly, bestie πŸ¦‹βœ¨ go decrement something responsibly 🫢

πŸ“¦ where this page comes from