sync_test_and_set_bit(9)
πΈ NAME πΈ
okay so bestie, weβre on the sync_test_and_set_bit(9) page of the Kernel API Manual, and the whole point is literally: set a bit and return its old value. Thatβs the serve. Thatβs the moment. π
β¨ SYNOPSIS β¨
bool sync_test_and_set_bit (long nr , volatile unsigned long *addr );
π ARGUMENTS π
nrβ the bit to set. Like, which little bit is getting the glow-up.addrβ the address to count from.
π₯ DESCRIPTION π₯
No cap: this operation is atomic and cannot be reordered. It also implies a memory barrier. Thatβs the whole flex, fr fr β do not sleep on it. π«Ά
π¦ SEE ALSO π¦
The kernel file ./arch/x86/include/asm/sync_bitops.h is right there, and these other icon pages are in the group chat:
sync_set_bit(9)sync_clear_bit(9)sync_change_bit(9)sync_test_and_clear_bit(9)sync_test_and_change_bit(9)
Bye bestie! Signing off from the ./arch/x86/include/asm source/version corner, dated October 2026 β 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