raw_atomic_l...dnot_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

raw_atomic_long_fetch_andnot_acquire(9) πŸ’…

okay bestie, welcome to the Kernel API Manual ✨ this one is a whole vibe: it's the raw_ variant, so you already know it's the ✨serious✨ one. also the page header got truncated to raw_atomic_l...dnot_acquire(9) which is honestly so dramatic of it 😭 but the real full name is in the NAME section, we move.


🌸 NAME 🌸

raw_atomic_long_fetch_andnot_acquire β€” atomic bitwise AND NOT with acquire ordering, no cap πŸŽ€


✨ SYNOPSIS ✨

long raw_atomic_long_fetch_andnot_acquire (long i , atomic_long_t *v );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • i β€” a long value. that's it, that's the whole argument. it's the long value, literally πŸ’…
  • v β€” pointer to atomic_long_t. yes queen, it's a pointer, you're updating the thing it points at ✨

πŸ’– DESCRIPTION πŸ’–

so what does it do?? it atomically updates v to (v & ~i) with acquire ordering. it's giving bitwise AND NOT but make it ✨atomic✨ and make it acquire-ordered 🫢

the important part: it's safe to use in noinstr code 😀 that's the whole reason the raw_ version exists. but everywhere else? prefer atomic_long_fetch_andnot_acquire instead. like yes bestie the raw one is iconic, but it's not the main character for general use, iykyk 🌈

pls don't just pick the raw_ one because it looks cool β€” the manpage is literally telling you to prefer atomic_long_fetch_andnot_acquire outside of noinstr code πŸ™ˆ

⭐ RETURN ⭐

it returns the original value of v β€” as in, what v was before the update. not the new value. the old one. periodt πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

kernel file: ./include/linux/atomic/atomic-long.h β€” that's where the source lives, go snoop 🧚

and here's the whole bestie squad, alphabetically-ish, all of them, no skips πŸŽ€


that's the whole page bestie, you ate that 🫢 this cutie lives in ./include/linux/atomic and the version stamp says October 2026 ⭐ mwah, go write some noinstr code responsibly πŸ’œ

πŸ“¦ where this page comes from