arch_clear_bit_unlock(9)
π arch_clear_bit_unlock(9) β from the Kernel API Manual, bestie π
Okay so welcome to the group chat, we're talking about <hotpink>arch_clear_bit_unlock</hotpink> today and honestly? She's a small function with main character energy. This page lives in the Kernel API Manual, and yes babe, we're reading the whole thing, no skimming. π
β¨ NAME β¨
arch_clear_bit_unlock β clear a bit in memory, for unlock π¦
Like, that's the whole vibe. Bit goes bye, specifically so you can unlock. Slay.
β¨ SYNOPSIS β¨
void arch_clear_bit_unlock (unsigned int nr , volatile unsigned long
*addr );
That's it. That's the signature. Copy it exactly, don't be cute with it β spacing, volatile, the line break, all of it, periodt. π
β¨ ARGUMENTS β¨
nrβ the bit to set. Yeah, the page literally says "set" even though the function's whole thing is clearing, but I'm not the one who wrote the docs and I'm not about to start beef with the docs π that's just what it says, fr fr.addrβ the address to start counting from. Point her at yourvolatile unsigned longand she'll take it from there. π«Ά
β¨ DESCRIPTION β¨
So what's actually happening: this operation is atomic, and it provides release barrier semantics. π₯
Like, the way that matters is: atomic means nobody's gonna catch it mid-operation, and release barrier semantics means there's ordering guarantees baked in β that's the whole reason this exists as an unlock-flavoured clear instead of just some regular bit-fiddling. It's giving "I'm not just a bit clear, I'm a bit clear with a promise." π
No cap, that's the entire description. Short page, iconic page. π
β¨ SEE ALSO β¨
- Kernel file
./include/asm-generic/bitops/lock.hβ go look at the source bestie, it's right there π§ arch_test_and_set_bit_lock(9)arch___clear_bit_unlock(9)β yes that's three underscores, look at her, she's fancy π
Little reminder from your girl: those names are exact. Three underscores onarch___clear_bit_unlock, one onarch_clear_bit_unlock. Don't come for me if you typo it, I warned you. π
And that's the page!! π Source and version for the sign-off: this one's from ./include/asm-generic/bitops, dated October 2026. Same page title, arch_clear_bit_unlock(9), both ends, as is tradition. Byeee, go clear some bits responsibly, mwah ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms