raw_atomic_l...xchg_relaxed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay so welcome to the Kernel API Manual, bestie β€” this page is raw_atomic_l...xchg_relaxed(9), and it's all about raw_atomic_long_xchg_relaxed, aka atomic exchange with relaxed ordering. no cap, that's the whole vibe ✨

✨ SYNOPSIS ✨

long raw_atomic_long_xchg_relaxed (atomic_long_t *v , long new );

πŸŽ€ ARGUMENTS πŸŽ€

  • v β€” pointer to atomic_long_t, so it's the address of the atomic long you're about to swap, bestie πŸ’…
  • new β€” a long value, and this is literally the value to assign 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so raw_atomic_long_xchg_relaxed atomically updates v to new with relaxed ordering. that's the whole plot, and it ate πŸ”₯

it's safe to use in noinstr code; for everywhere else, prefer atomic_long_xchg_relaxed, periodt πŸ’–

🌸 RETURN 🌸

it returns the original value of v β€” like, the value that was there before the swap. iconic receipt behavior, honestly 🧾✨

πŸ’– SEE ALSO πŸ’–


source/version vibes: ./include/linux/atomic, dated October 2026, page raw_atomic_l...xchg_relaxed(9) β€” mwah, bye bestie! πŸ’–πŸŽ€

πŸ“¦ where this page comes from