.TH "test_and_clear_bit" 9 "test_and_clear_bit" "25 May 1998" "Kernel Hacker's Manual" LINUX .SH NAME test_and_clear_bit \- Clear a bit and return its old value .SH SYNOPSIS .B "int" test_and_clear_bit .BI "(int " nr "," .BI "volatile void *" addr ");" .SH ARGUMENTS .IP "nr" 12 Bit to clear .IP "addr" 12 Address to count from .SH "DESCRIPTION" This operation is atomic and cannot be reordered. It also implies a memory barrier.