__mips_test_and_change_bit(9)
π NAME
okay bestie, this is the Kernel API Manual page for __mips_test_and_change_bit(9), and the whole vibe is: it changes a bit and returns its old value. That's the main character move. It's called by test_and_change_bit() if it cannot find a faster solution. Periodt.
β¨ SYNOPSIS β¨
int __mips_test_and_change_bit (unsigned long nr , volatile unsigned long *addr );
No cap, that's the signature: a bit number nr and a pointer to a volatile unsigned long called addr.
π ARGUMENTS π
nrβ bit to change. Which bit, bestie? This one.addrβ address to count from. That's literally what the page says.
π SEE ALSO π
Kernel file ./arch/mips/lib/bitops.c, plus these iconique friends:
__mips_set_bit(9)__mips_clear_bit(9)__mips_change_bit(9)__mips_test_and_set_bit_lock(9)__mips_test_and_clear_bit(9)
okay that's the whole thing π«Ά β source/version is ./arch/mips/lib, dated October 2026, and the page is __mips_test_and_change_bit(9). slay.
π¦ 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