raw_atomic64_xor(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ NAME πŸ¦‹

okay so this is raw_atomic64_xor(9), straight outta the Kernel API Manual, and it does an atomic bitwise XOR with relaxed ordering πŸ’… that's the whole vibe.


✨ SYNOPSIS ✨

void raw_atomic64_xor (s64 i , atomic64_t *v );

like yes bestie, that's it, no cap 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • i β€” an s64 value. that's the number you're XOR-ing in, periodt.
  • v β€” pointer to atomic64_t. the main character of this whole operation tbh πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

Atomically updates v to (v ^ i) with relaxed ordering ✨ the way that it just flips those bits in one go is genuinely iconic.

it's safe to use in noinstr code 😌 but the page says prefer atomic64_xor elsewhere β€” so like, use the raw one when you actually need it, iykyk πŸ”₯

ngl, when the manpage says "prefer atomic64_xor elsewhere," it's being so fr. the raw_ version is the special-occasion shoe, not the everyday sneaker πŸ‘Ÿ

🌈 RETURN 🌈

Nothing. πŸ«₯ literally zero. it hands you nothing back and honestly? that's its whole thing πŸ’€


⭐ SEE ALSO ⭐

first up, the file this page lives its life in πŸ‘‡

./include/linux/atomic/atomic-arch-fallback.h

πŸ“ the raw_atomic_* crew

🧚 the raw_atomic64_* crew

jealous? that's 80+ siblings and every single one is invited to the function πŸ’€ iconic family, honestly πŸŽ€

and that's the page, bestie πŸŒˆπŸ’– this whole thing came from the kernel file ./include/linux/atomic and it's dated October 2026 β€” so go forth and XOR atomically, you absolute legend πŸ‘‘βœ¨

πŸ“¦ where this page comes from