locking/atomics, cmpxchg: Privatize the inclusion of asm/cmpxchg.h
[sfrench/cifs-2.6.git] / Documentation / atomic_ops.txt
index b19fc34efdb17921af43bda0000b13dc82640451..c9d1cacb439590a02dbfb1282cbe0d3abe3a9b0d 100644 (file)
@@ -542,6 +542,10 @@ The routines xchg() and cmpxchg() must provide the same exact
 memory-barrier semantics as the atomic and bit operations returning
 values.
 
+Note: 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.
+
 Spinlocks and rwlocks have memory barrier expectations as well.
 The rule to follow is simple: