___change_bit(9)
π NAME
okay so bestie, welcome to the Kernel API Manual β the main character today is ___change_bit(9), and its whole vibe is flipping a single bit in memory. That's it. That's the gig. π
β¨ SYNOPSIS
void ___change_bit (unsigned long nr , volatile unsigned long *addr );
π ARGUMENTS
nrβ the bit to change. this is the bit you're toggling, bestie.addrβ the address to start counting from. yes, literally the starting address for the counting situation.
π¦ DESCRIPTION
okay so real talk: unlike change_bit, this function is non-atomic and may be reordered. it is absolutely not giving "safe simultaneous vibes."
π¨ if it's called on the same region of memory simultaneously, the effect may be that only one operation succeeds. so likeβ¦ don't expect both calls to land, because that's literally the warning.
π SEE ALSO
- Kernel file:
./tools/include/asm-generic/bitops/non-atomic.h ___set_bit(9)___test_and_set_bit(9)___test_and_clear_bit(9)_test_bit(9)
mwah π this lil page came from ./tools/include/asm-generic/bi... and it's dated October 2026 β periodt. π«Ά
π¦ 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