atomic64_fe...dnot_relaxed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ atomic64_fetch_andnot_relaxed(9) ✨

okay bestie so you're reading a Kernel API Manual page, and the star of the show is atomic64_fetch_andnot_relaxed β€” literally the most "and-not, but make it chill" function in the whole tree πŸ’…


πŸŽ€ NAME πŸŽ€

atomic64_fetch_andnot_relaxed β€” atomic bitwise AND NOT with relaxed ordering. yes, that's the whole name, she's got nothing to hide πŸ¦‹


⭐ SYNOPSIS ⭐

s64 atomic64_fetch_andnot_relaxed (s64 i , atomic64_t *v );

that's it. two arguments. one vibe. 😌


πŸ’œ ARGUMENTS πŸ’œ

  • i β€” a s64 value. that's the thing you're AND-NOT-ing with, iykyk πŸ’«
  • v β€” pointer to an atomic64_t. the actual target, the main character here πŸ‘‘

🌸 DESCRIPTION 🌸

Atomically updates v to (v & ~i) with relaxed ordering. like, she does the whole read-modify-write in one go so nobody can sneak in and mess with it, and she does it relaxed β€” no extra ordering drama, no fences, just the atomic bit πŸ‘

⚠️ Unsafe to use in noinstr code β€” nope nope nope, do NOT use this one there. If you're in noinstr code, use raw_atomic64_fetch_andnot_relaxed instead, fr fr πŸ˜­πŸ™ˆ

πŸ¦‹ RETURN πŸ¦‹

The original value of v β€” like, what she was before the AND NOT happened. iconic little time capsule πŸŽ€


🌈 SEE ALSO 🌈

Kernel file ./include/linux/atomic/atomic-instrumented.h β€” that's her address bestie πŸ’–

and now, the group chat. literally the entire atomic family showed up and they all brought their (9) pages. this list is giving family reunion 🫢


and that's the whole page bestie, no crumbs left πŸ’œ she lives in ./include/linux/atomic, the version stamp says October 2026, and the whole thing is filed under atomic64_fe...dnot_relaxed(9) in the Kernel API Manual. mwah, go AND NOT something atomically πŸ“βœ¨

πŸ“¦ where this page comes from