raw_atomic64_fetch_xor(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ raw_atomic64_fetch_xor(9) β€” Kernel API Manual 🌈

okay bestie, welcome to the page for raw_atomic64_fetch_xor(9), straight outta the Kernel API Manual. yes, we are in the kernel docs, and yes, it's giving main character energy πŸ‘‘βœ¨


🌸 NAME 🌸

raw_atomic64_fetch_xor β€” atomic bitwise XOR with full ordering. that's the name, that's the vibe, periodt πŸ’…


✨ SYNOPSIS ✨

the signature, verbatim, do not freestyle it bestie 😭:

s64 raw_atomic64_fetch_xor (s64 i , atomic64_t *v );

πŸŽ€ ARGUMENTS πŸŽ€

  • i β€” an s64 value. that's the value, bestie 🫢
  • v β€” pointer to atomic64_t. yes, a pointer, to an atomic64_t, exactly as the page says πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea β˜•: this bad boy atomically updates v to (v ^ i) with full ordering. read that again, bestie: (v ^ i), with full ordering, no cap πŸ”₯

and the other iconic detail: it's safe to use in noinstr code β€” yes, that's literally what the page says. but elsewhere, prefer atomic64_fetch_xor, okay? the manual says it, so we say it 🫢✨


πŸ’– RETURN πŸ’–

it returns the original value of v β€” like it hands you the before pic while updating the after pic 😭πŸ”₯πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

first up, the kernel file: ./include/linux/atomic/atomic-arch-fallback.h β€” that exact path, bestie, iykyk 🧚✨

and now the whole entire extended fam, every single ref, no cuts, no skips, periodt πŸ‘‘:


before you go, footer tea β˜•: source/version is ./include/linux/atomic, and the date is October 2026. mwah πŸ’‹ bye bestie, go atomically XOR something with full ordering βœ¨πŸ‘‹

πŸ“¦ where this page comes from