Intel’s ‘cmpxchg’ instruction How does the Linux kernel’s ‘cmos_lock’ mechanism work?
Intel’s ‘cmpxchg’ instruction