atomic64_try...xchg_release(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… atomic64_try...xchg_release(9) πŸ’…

okay so bestie, welcome to atomic64_try...xchg_release(9) from the Kernel API Manual β€” manual name folded in near the top like a little name tag, and no boring header-line copy-paste here ✨. This is the page where a 64-bit atomic compare-and-exchange gets its release-ordering moment, and we’re keeping every single detail, periodt.

🌸 NAME 🌸

atomic64_try_cmpxchg_release β€” atomic compare and exchange with release ordering. That’s the whole vibe check: compare, exchange, release ordering πŸ’–.

✨ SYNOPSIS ✨

bool atomic64_try_cmpxchg_release (atomic64_t *v , s64 *old , s64 new );

πŸŽ€ ARGUMENTS πŸŽ€

  • v β€” pointer to atomic64_t. This is the atomic64_t you’re messing with πŸ’….
  • old β€” pointer to s64 value to compare with. It’s the compare buddy.
  • new β€” s64 value to assign. The new value that wants its moment.

πŸ¦‹ DESCRIPTION πŸ¦‹

If (v == old), it atomically updates v to new with release ordering. Otherwise, v is not modified, old is updated to the current value of v, and relaxed ordering is provided. That’s the whole branchy little story 😭✨.

⚠️ Unsafe to use in noinstr code β€” use raw_atomic64_try_cmpxchg_release there instead. No cap, that’s important.

πŸ”₯ RETURN πŸ”₯

true if the exchange occurred, false otherwise. That’s it, bestie: boolean, no extra lore πŸ‘‘.

🌈 SEE ALSO 🌈

okay this is the giant family reunion, and we are not skipping a single cousin. The kernel file plug is ./include/linux/atomic/atomic-instrumented.h, and then:


okay that’s the whole page, bestie 🫢. Cute little footer sign-off: this one’s from ./include/linux/atomic, dated October 2026, and it’s the atomic64_try...xchg_release(9) page β€” slay, bye πŸ’–βœ¨.

πŸ“¦ where this page comes from