raw_atomic64...xchg_release(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the Kernel API Manual page filed under raw_atomic64...xchg_release(9) πŸ’– This one is all about raw_atomic64_cmpxchg_release, and it is literally giving atomic compare and exchange with release ordering. Let’s get into it.

🌸 NAME

raw_atomic64_cmpxchg_release β€” atomic compare and exchange with release ordering, periodt.

✨ SYNOPSIS

s64 raw_atomic64_cmpxchg_release (atomic64_t *v , s64 old , s64 new );

🫢 ARGUMENTS

  • v β€” pointer to atomic64_t
  • old β€” s64 value to compare with
  • new β€” s64 value to assign

πŸ’… DESCRIPTION

Here’s the tea: If (v == old), this atomically updates v to new with release ordering. Otherwise, v is not modified and relaxed ordering is provided. No cap.

It is safe to use in noinstr code; prefer atomic64_cmpxchg_release elsewhere. That part is important, bestie 🫢

πŸ”₯ RETURN

The original value of v β€” that’s what it hands back to you.

πŸ¦‹ SEE ALSO

Kernel file: ./include/linux/atomic/atomic-arch-fallback.h

And here’s the whole atomic friend group, every single reference, slay:


Cute sign-off time, bestie 🫢 source/version ./include/linux/atomic, date October 2026, page raw_atomic64...xchg_release(9). Bye πŸ’‹

πŸ“¦ where this page comes from