raw_atomic64...xchg_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… raw_atomic64...xchg_acquire(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual page filed under raw_atomic64...xchg_acquire(9). The actual function we're hyping up is raw_atomic64_try_cmpxchg_acquire, and she is lowkey iconic. ✨


πŸ’– NAME πŸ’–

raw_atomic64_try_cmpxchg_acquire β€” atomic compare and exchange with acquire ordering. That's the whole name, no cap. 🫢


✨ SYNOPSIS ✨

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

πŸŽ€ ARGUMENTS πŸŽ€

  • v β€” pointer to atomic64_t. This is the atomic value getting the vibe check. πŸ’…
  • old β€” pointer to an s64 value to compare with. The "are you her?" pointer.
  • new β€” an s64 value to assign. The glow-up value. 🌸

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea. β˜•

If (v == old), it atomically updates v to new with acquire ordering. Slay. If that's not the case, v is not modified, old is updated to the current value of v, and relaxed ordering is provided. So even the miss gives you info, periodt.

It's safe to use in noinstr code; prefer atomic64_try_cmpxchg_acquire elsewhere. That's the rule, bestie. 🫑


πŸ”₯ RETURN πŸ”₯

true if the exchange occurred, false otherwise. Simple, clean, main-character energy. πŸ‘‘


🌈 SEE ALSO 🌈

Sibling pages and the kernel file, gathered for your reading pleasure:


Bye bestie πŸ’œ this page comes from ./include/linux/atomic, dated October 2026, and its manual slug is raw_atomic64...xchg_acquire(9). Go be atomic πŸ’…βœ¨

πŸ“¦ where this page comes from