sync_test_and_clear_bit(9)
sync_test_and_clear_bit(9) β Kernel API Manual π
okay so bestie, welcome to the sync_test_and_clear_bit(9) page π this is the Kernel API Manual, and we're clearing a bit and handing back its old value. iconic behavior, no cap.
β¨ NAME β¨
sync_test_and_clear_bit β Clear a bit and return its old value π
πΈ SYNOPSIS πΈ
int sync_test_and_clear_bit (long nr , volatile unsigned long *addr );
π ARGUMENTS π
nrβ Bit to clear πaddrβ Address to count from π«Ά
π« DESCRIPTION π«
This operation is atomic and cannot be reordered. It also implies a memory barrier. so likeβ¦ it's giving "do not reorder me, I mean it" energy, fr fr ππ₯
π SEE ALSO π
Kernel file ./arch/x86/include/asm/sync_bitops.h plus these besties:
sync_set_bit(9)sync_clear_bit(9)sync_change_bit(9)sync_test_and_set_bit(9)sync_test_and_change_bit(9)
cute sign-off time π source/version: ./arch/x86/include/asm Β· date: October 2026 Β· manual: sync_test_and_clear_bit(9) β mwah, bye bestie πβ¨
π¦ 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