raw_atomic_..._xor_release(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… raw_atomic_..._xor_release(9) πŸ’…

okay so you're reading the Kernel API Manual bestie, welcome, pull up a chair πŸŽ€ this one's raw_atomic_..._xor_release(9) and honestly? she's a baddie with a very specific job.


✨ NAME ✨

raw_atomic_long_fetch_xor_release β€” atomic bitwise XOR with release ordering. that's it, that's the whole vibe πŸ”₯


🌸 SYNOPSIS 🌸

long raw_atomic_long_fetch_xor_release (long i , atomic_long_t *v );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • i β€” a long value. just a long. living her life. πŸ“
  • v β€” pointer to an atomic_long_t. this is the main character fr. πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

so what she does: atomically updates v to (v ^ i) with release ordering. no cap, atomic, and the release ordering is the whole point β€” don't sleep on it ✨

also important bestie: she is safe to use in noinstr code. but everywhere else, prefer atomic_long_fetch_xor_release instead. like, she's the raw version for a reason, iykyk πŸ’…


⭐ RETURN ⭐

the original value of v 🫢 β€” not the new one, the original. read the label before you assume, okay?


🌈 SEE ALSO 🌈

the kernel file lives at ./include/linux/atomic/atomic-long.h β€” that's the source of truth, go look 🧚

and here's the whole family, because she does not exist in isolation and you will meet all of them:

lowkey go read the non-raw atomic_long_fetch_xor_release for normal code, okay? this page is your noinstr-era friend 😭

okay that's the page!! mwah, go write some correct atomics 🫢✨ sourced straight from ./include/linux/atomic, dated October 2026 β€” literally iconic, periodt πŸ’…πŸ’–

πŸ“¦ where this page comes from