raw_atomic_set_release(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Hey bestie πŸ’– welcome to raw_atomic_set_release, straight out of the Kernel API Manual, section 9. Yes we're in kernel land, yes it's giving "low-level but make it cute," and yes I'm gonna walk you through it like we're texting at 2am. πŸ¦‹


✨ NAME ✨

raw_atomic_set_release β€” an atomic set, but with release ordering. That's it. That's the whole vibe. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

void raw_atomic_set_release (atomic_t *v , int i );

🌸 ARGUMENTS 🌸

  • v β€” a pointer to an atomic_t. That's the thing being set, bestie, not a copy of it.
  • i β€” the int value you're assigning to it. Literally just the number going in.

πŸ’– DESCRIPTION πŸ’–

So like, this function atomically sets v to i with release ordering. Atomically meaning nobody's catching it mid-change, and release ordering meaning the ordering part is baked in, iykyk. ⭐

It's safe to use in noinstr code β€” that's the whole reason this raw version exists. Everywhere else, though? Prefer atomic_set_release. No cap, that's the recommendation. πŸ‘‘


πŸ”₯ RETURN πŸ”₯

Nothing. Zero. Nada. It returns void, and it means it. 🫢


🌈 SEE ALSO 🌈

First up, the kernel file it lives in β€” go look at it if you're nosy (affectionate):

  • ./include/linux/atomic/atomic-arch-fallback.h

And now the friend group. The whole entire friend group. Every single one of them, in order, no skipping. πŸ§šβ€β™€οΈ

The raw_atomic_* girlies:

And the raw_atomic64_* side of the family (they're taller, that's the difference πŸ’€):


That's the whole page, bestie, you ate it. πŸ“ Signing off from the source path ./include/linux/atomic with the date October 2026 β€” that's where this iconic little doc calls home, and honestly? Main character energy. πŸ’œπŸ¦‹

πŸ“¦ where this page comes from