test_and_set_bit(int nr, volatile void *addr)
Set a bit and return its old value
nr -- Bit to set
addr -- Address to count from
test_and_clear_bit(int nr, volatile void *addr)
Clear a bit and return its old value
nr -- Bit to clear
addr -- Address to count from
test_and_set_bit(0, &val)
将val的第0位设为1,并返回该位设置前的值