atomic64_xchg_release(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… atomic64_xchg_release β€” straight out of the Kernel API Manual, section 9

okay so bestie, welcome to atomic64_xchg_release(9), and yes the manual name is literally Kernel API Manual β€” we're in the kernel docs, section 9, and this one is a whole vibe πŸŽ€


✨ NAME ✨

atomic64_xchg_release β€” atomic exchange with release ordering. that's it, that's the function πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

s64 atomic64_xchg_release (atomic64_t *v , s64 new );

(no, the spacing is not a typo, copy it exactly, iykyk πŸ™ˆ)


πŸ“ ARGUMENTS πŸ“

  • v β€” pointer to atomic64_t. it's the thing we're gonna swap out, main character energy πŸ‘‘
  • new β€” an s64 value to assign. this is the glow-up that goes in 🫢

πŸ’– DESCRIPTION πŸ’–

Atomically updates v to new with release ordering. one clean swap, no half-states, no messy in-between eras β€” literally the whole point ✨

⚠️ unsafe to use in noinstr code. if you're in noinstr, use raw_atomic64_xchg_release there instead. not me warning you twice, it's just facts πŸ’€

🌈 RETURN 🌈

The original value of v. so you get the old value back while the new one moves in β€” trade, not a steal πŸ’«


πŸŽ€ SEE ALSO πŸŽ€

Kernel file ./include/linux/atomic/atomic-instrumented.h β€” and bestie, the friend group here is massive, so buckle up, we're listing every single one 🧚✨

the atomic_* girlies:

the 64-bit squad (our actual function's fam) πŸ”₯:

the atomic_long_* crew, doing the absolute most πŸ’œ:


and that's the whole page, bestie β€” every single (9) accounted for, no cap 🫢

cute little sign-off: this page sourced from ./include/linux/atomic, dated October 2026, and it's atomic64_xchg_release(9) all the way down πŸ’–βœ¨

πŸ“¦ where this page comes from