raw_atomic_l...turn_release(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… raw_atomic_long_dec_return_release(9) β€” Kernel API Manual πŸŽ€

okay so bestie, welcome to the Kernel API Manual, and lemme tell you about raw_atomic_long_dec_return_release β€” she's a little function with a very long name and main character energy. like, the name alone is a whole paragraph. but she slays, and I'm gonna explain her to you fr fr πŸ’–


✨ NAME ✨

raw_atomic_long_dec_return_release β€” atomic decrement, but make it release ordering πŸ’…

that's it. that's the vibe. one (1) decrement, atomically, with release ordering, and she returns the new value. icon behavior.


πŸ¦‹ SYNOPSIS πŸ¦‹

long raw_atomic_long_dec_return_release (atomic_long_t *v );

that's the signature, copy it exactly, don't be cute with it 😭


🌸 ARGUMENTS 🌸

  • v β€” pointer to atomic_long_t. that's it. that's the whole argument. she takes one pointer and she takes it seriously.

πŸ‘‘ DESCRIPTION πŸ‘‘

Atomically updates v to (v - 1) with release ordering.

okay so unglamorous but important: she takes v, she subtracts one, she does it atomically (nobody else can catch her mid-subtract), and she does it with release ordering β€” that's the memory-ordering flavor of the moment, periodt.

Safe to use in noinstr code; prefer atomic_long_dec_return_release elsewhere.

🚨 bestie read this one twice: she's raw_ so she's the one you reach for inside noinstr code. Everywhere else, the manpage literally says prefer atomic_long_dec_return_release. don't be out here using the raw one at brunch when the normal one exists. iykyk πŸ™ˆ

⭐ RETURN ⭐

The updated value of v.

so like β€” not the old value, the updated one. post-decrement, not pre-decrement. she's giving you the result, not the receipt. 🧾✨


🌈 SEE ALSO 🌈

Kernel file: ./include/linux/atomic/atomic-long.h β€” that's where she lives, address her correctly 🫢

and now the whole friend group, because she literally refuses to be listed without all 84 of her sisters. no cap, all of these:

like okayyyyy family reunion πŸ˜­πŸ’€ every single one accounted for, nobody left on read.


and that's the page bestie!! πŸŽ€ this lil legend comes from the source ./include/linux/atomic, dated October 2026, and she's filed under raw_atomic_l...turn_release(9) in the Kernel API Manual β€” go forth, decrement responsibly, and remember: noinstr only, gorgeous. mwah πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from