summaryrefslogtreecommitdiffstats
path: root/Documentation/atomic_ops.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/atomic_ops.txt')
-rw-r--r--Documentation/atomic_ops.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt
index b19fc34efdb1..c9d1cacb4395 100644
--- a/Documentation/atomic_ops.txt
+++ b/Documentation/atomic_ops.txt
@@ -542,6 +542,10 @@ The routines xchg() and cmpxchg() must provide the same exact
542memory-barrier semantics as the atomic and bit operations returning 542memory-barrier semantics as the atomic and bit operations returning
543values. 543values.
544 544
545Note: If someone wants to use xchg(), cmpxchg() and their variants,
546linux/atomic.h should be included rather than asm/cmpxchg.h, unless
547the code is in arch/* and can take care of itself.
548
545Spinlocks and rwlocks have memory barrier expectations as well. 549Spinlocks and rwlocks have memory barrier expectations as well.
546The rule to follow is simple: 550The rule to follow is simple:
547 551