bts( bit test and reset), btr oprd1,oprd2 位测试并复位指令,被测试位送cf并且被测试位清0;上面的内联汇编代码原子地清除addr所指对象的第nr位。它不包含内存屏障(当多个cpu同时访问一块内存,或者cpu和设备同时访问一块内存,为了实现访问的一致性,需要内存屏障),因此只是用于锁,为了确保在其他的进程中可见,你应该先调用 smp_mb__before_clear_bit(), smp_mb__after_clear_bit();
/**
* __change_bit - toggle a bit in memory
* @nr: the bit to change
* @addr: the address to start counting from
*
* unlike change_bit(), this functionis non-atomic and may be reordered.
*if it's called on the same region of memory simultaneously, the effect