atomic_xchg & atomic_cmpxchg
If someone wants to use xchg(), cmpxchg() and their variants, linux/atomic.h should be included rather than asm/cmpxchg.h, unless the code is in arch/* and can take care of itself.
"compare and swap" atomically:
1) Compares "old" with the value currently at …