raw_atomic_...turn_release(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to the Kernel API Manual β€” today's main character is raw_atomic_sub_return_release, and it's giving atomic subtract with release ordering. Honestly? iconic. πŸ’–

πŸŽ€ NAME πŸŽ€

raw_atomic_sub_return_release β€” atomic subtract with release ordering. That's the name, that's the vibe, no notes. ✨

✨ SYNOPSIS ✨

here's the signature, bestie β€” copy it exactly, because we do not freestyle C signatures in this house:

int raw_atomic_sub_return_release (int i , atomic_t *v );

πŸ’… ARGUMENTS πŸ’…

okay so there are exactly two inputs and both matter:

  • i β€” int value to subtract. the little number doing the subtracting, slay.
  • v β€” pointer to atomic_t. this is the atomic bestie getting updated. 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the actual tea: it atomically updates v to (v - i) with release ordering. that's the whole move. πŸ’…

It's safe to use in noinstr code β€” but the manual says prefer atomic_sub_return_release elsewhere. so that's the preference, iykyk. 😌

🌸 RETURN 🌸

you get the updated value of v back. that's it. that's the return. periodt. 🫢

🌈 SEE ALSO 🌈

bestie, the SEE ALSO section is literally the whole atomic extended universe. every single ref is here, no cap:


that's the page, bestie! this is the Kernel API Manual entry for raw_atomic_sub_return_release, source/version ./include/linux/atomic, dated October 2026. if you need to, go update v to (v - i) atomically with release ordering and absolutely slay. πŸ’…βœ¨

πŸ“¦ where this page comes from