atomic_xchg_release(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ atomic_xchg_release β€” Kernel API Manual ✨

Okay bestie, welcome to the Kernel API Manual page for atomic_xchg_release β€” the atomic exchange that said β€œrelease ordering, but make it cute.” πŸ’… This is the whole page, every detail included, no cap.

🌸 NAME 🌸

atomic_xchg_release β€” atomic exchange with release ordering

🫢 SYNOPSIS 🫢

int atomic_xchg_release (atomic_t *v , int new );

πŸ’… ARGUMENTS πŸ’…

  • v β€” pointer to atomic_t
  • new β€” int value to assign

🌈 DESCRIPTION 🌈

Okay so the main character move: it atomically updates v to new with release ordering. That's the entire plot, and it's iconic.

⚠️ Unsafe to use in noinstr code; use raw_atomic_xchg_release there. This warning is not a joke, bestie β€” noinstr code needs the raw_ one.

πŸŽ€ RETURN πŸŽ€

It returns the original value of v β€” aka the value that was chillin' there before the exchange. 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

This is the related-pages lineup, and yes it's giving extended cinematic universe. The kernel file is ./include/linux/atomic/atomic-instrumented.h. Related man pages:

32-bit atomic_* besties

64-bit atomic64_* besties

Long atomic_long_* besties


And that's the page, bestie. Cute little sign-off: source/version is ./include/linux/atomic, the date is October 2026, and the page is atomic_xchg_release(9). 🫢✨

πŸ“¦ where this page comes from