cmpxchg-emaple This is an example to demonstrate how you can use the Intel's "cmpxchg" instruction to implement a lock. Compile: gcc -o cmpxchg_lock cmpxchg_lock.c -lpthread