atomic_long_...dnot_release(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… atomic_long_fetch_andnot_release β€” from the Kernel API Manual πŸŽ€

okay so bestie, welcome to another ✨ Kernel API Manual ✨ page, and this one is a genuine little baddie. Her government name is atomic_long_fetch_andnot_release(9) (yes that's a lot of name, she ate and left no crumbs).


🌸 NAME 🌸

atomic_long_fetch_andnot_release β€” it does an atomic bitwise AND NOT with release ordering. Sounding very serious and very powerful, honestly iconic.


πŸ¦‹ SYNOPSIS πŸ¦‹

long atomic_long_fetch_andnot_release (long i , atomic_long_t *v );

πŸŽ€ ARGUMENTS πŸŽ€

  • i β€” a long value. that's it, that's the whole vibe. she's just a long.
  • v β€” pointer to an atomic_long_t. she's the main character here ngl, this is the thing getting updated.

✨ DESCRIPTION ✨

okay so the whole thing: it atomically updates v to (v & ~i) with release ordering. like, the math is v & ~i, the delivery is atomic, the ordering is release. she does it all and she does it without racing anybody. slay.

🚨 lowkey important warning bestie: this is unsafe to use in noinstr code. use raw_atomic_long_fetch_andnot_release there instead. do not come for me if you ignore this, fr fr, i warned you πŸ’€

🫢 RETURN 🫢

it returns the original value of v β€” so like, the value from before the glow-up. you get the before picture, the variable gets the after picture. everybody wins πŸ’–


🌈 SEE ALSO 🌈

found in the kernel file ./include/linux/atomic/atomic-instrumented.h β€” and bestie, she has so many cousins. like, an entire family reunion. buckle up 🎒


and that's the page bestie!! πŸ§šπŸ’œ this one came out of ./include/linux/atomic and it's dated October 2026 β€” so like, future girlie behavior honestly. stay atomic, stay ordered, and don't forget the raw_ version in noinstr code. mwah πŸ’‹πŸŽ€β­

πŸ“¦ where this page comes from