atomic_long..._xor_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Okay so bestie, welcome to the Kernel API Manual page for atomic_long_fetch_xor_acquire β€” the header line spells it atomic_long..._xor_acquire(9), ellipsis and all, and honestly? Iconic. This one is atomic bitwise XOR with acquire ordering. That's the whole vibe: XOR, but atomic, and with acquire ordering. Periodt. πŸ¦‹

✨ SYNOPSIS ✨

long atomic_long_fetch_xor_acquire (long i , atomic_long_t *v );

🌸 ARGUMENTS 🌸

  • i β€” a long value. This is your XOR buddy.
  • v β€” pointer to atomic_long_t. This is the atomic long getting the glow-up.

πŸŽ€ DESCRIPTION πŸŽ€

Atomically updates v to (v ^ i) with acquire ordering. Like, it does the XOR and the acquire-ordering thing together, no cap. πŸ’…

⚠️ Unsafe to use in noinstr code; use raw_atomic_long_fetch_xor_acquire there. This is the β€œdo not pass go” note, fr fr.

🫢 RETURN 🫢

The original value of v. So you get the before pic while v gets the after pic. 😭

🌈 SEE ALSO 🌈

Kernel file ./include/linux/atomic/atomic-instrumented.h β€” and here’s the whole group chat, every single one, don’t skip anybody:


πŸŽ€ cute lil sign-off: source/version ./include/linux/atomic, date October 2026, page atomic_long..._xor_acquire(9). Go be atomic with your bad self, bestie. πŸ’–βœ¨
πŸ“¦ where this page comes from