atomic_long_andnot(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ atomic_long_andnot β€” Kernel API Manual πŸŽ€

okay bestie, so this is the Kernel API Manual page for atomic_long_andnot, and honestly? it's giving short-and-iconic. tiny function, big main character energy. let's get into it πŸ’…


✨ NAME ✨

atomic_long_andnot β€” atomic bitwise AND NOT, but with relaxed ordering πŸ¦‹

like yes it does math on your long, yes it does it atomically, no it is not out here enforcing any extra memory-ordering drama. relaxed. chill. lowkey effortless.

🌸 SYNOPSIS 🌸

void atomic_long_andnot (long i , atomic_long_t *v );

🧚 ARGUMENTS 🧚

  • i β€” a long value. that's it, that's the whole vibe. it's the thing getting flipped before the AND.
  • v β€” pointer to atomic_long_t. this is the glow-up target, the value that's actually getting updated.

πŸ”₯ DESCRIPTION πŸ”₯

Atomically updates v to (v & ~i) with relaxed ordering ✨

translation bestie: it flips every bit of i, ANDs that against whatever v currently is, and writes the result back β€” all in one atomic lil move, so nobody else can catch v mid-update. no cap πŸ’–

⚠️ unsafe to use in noinstr code β€” use raw_atomic_long_andnot there instead. please please please remember this one, it's not a suggestion πŸ™ˆ

⭐ RETURN ⭐

Nothing. literally nothing. it returns void, it does the thing, it leaves. no value, no receipt, just vibes 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/atomic/atomic-instrumented.h β€” and okay the friend group here is huge, so buckle up, i'm listing every single one because i would never do them dirty like that 😭

🌈 the atomic_ besties

πŸ’œ the atomic64_ besties

🩷 the atomic_long_ besties (our people!!)


and that's the whole page bestie 🫢 this lil entry lives in ./include/linux/atomic, dated October 2026, so like… future-iconic. go atomically AND-NOT something, be safe in your noinstr code, and slay πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from