xor_unlock_is_negative_byte(9)
πΈ NAME πΈ
Itβs xor_unlock_is_negative_byte, bestie β the Kernel API Manual entry with the long name and a very specific little job. In plain terms: XOR a single byte in memory and test if it is negative, for unlock. Yes, that is literally the whole name-vibe. π
β¨ SYNOPSIS β¨
bool xor_unlock_is_negative_byte (unsigned long mask , volatile unsigned
long *addr );
π ARGUMENTS π
maskβ change the bits which are set in this mask.addrβ the address of the word containing the byte to change.
π¦ DESCRIPTION π¦
Okay so this function changes some of bits 0-6 in the word pointed to by addr. It is atomic and gives release barrier semantics β no cap, that part is important. Itβs used to optimise some folio operations which are commonly paired with an unlock or end of writeback. Bit 7 is used as PG_waiters to indicate whether anybody is waiting for the unlock. π«Ά
π RETURN π
It returns whether the top bit of the byte is set. Simple as that, periodt. β¨
π SEE ALSO π
- Kernel file:
./include/asm-generic/bitops/instrumented-lock.h clear_bit_unlock(9)__clear_bit_unlock(9)test_and_set_bit_lock(9)
Cute sign-off time: source/version is ./include/asm-generic/bitops, dated October 2026, and the page is xor_unlock_is_negative_byte(9). Bye bestie, go be iconic with your bits π«Άππ
π¦ 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