raw_atomic_..._xor_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

raw_atomic_..._xor_acquire(9) πŸ’…βœ¨

okay so welcome to the Kernel API Manual, bestie β€” today’s main character is raw_atomic_long_fetch_xor_acquire, and she’s here to do an atomic bitwise XOR with acquire ordering. no cap, she’s iconic. πŸ¦‹


✨ NAME ✨

raw_atomic_long_fetch_xor_acquire β€” atomic bitwise XOR with acquire ordering. that’s the whole vibe, fr fr. πŸ’–

πŸ“œ SYNOPSIS πŸ“œ

long raw_atomic_long_fetch_xor_acquire (long i , atomic_long_t *v );

🧾 ARGUMENTS 🧾

  • i β€” a long value. that’s the value you’re XOR-ing in, bestie. 🌸
  • v β€” pointer to atomic_long_t. that’s the atomic long getting updated. πŸ’…

πŸ’– DESCRIPTION πŸ’–

okay so this one atomically updates v to (v ^ i) with acquire ordering. it’s giving β€œtiny but powerful,” and the way it does the whole thing atomically is lowkey iconic. ✨

it’s safe to use in noinstr code β€” but outside of that, please prefer atomic_long_fetch_xor_acquire elsewhere. iykyk. 🫢

🎁 RETURN 🎁

the original value of v. not the new one β€” the original one, bestie. that’s what you get back. πŸ’–

πŸ‘€ SEE ALSO πŸ‘€

Kernel file: ./include/linux/atomic/atomic-long.h 🧚


xoxo bestie πŸ’… β€” this page came from the ./include/linux/atomic source/version, dated October 2026, and it’s all about raw_atomic_..._xor_acquire(9) πŸŽ€βœ¨

πŸ“¦ where this page comes from