summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/atomic_ops.txt4
-rw-r--r--Documentation/memory-barriers.txt6
2 files changed, 6 insertions, 4 deletions
diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt
index dab6da3382d9..b19fc34efdb1 100644
--- a/Documentation/atomic_ops.txt
+++ b/Documentation/atomic_ops.txt
@@ -266,7 +266,9 @@ with the given old and new values. Like all atomic_xxx operations,
266atomic_cmpxchg will only satisfy its atomicity semantics as long as all 266atomic_cmpxchg will only satisfy its atomicity semantics as long as all
267other accesses of *v are performed through atomic_xxx operations. 267other accesses of *v are performed through atomic_xxx operations.
268 268
269atomic_cmpxchg must provide explicit memory barriers around the operation. 269atomic_cmpxchg must provide explicit memory barriers around the operation,
270although if the comparison fails then no memory ordering guarantees are
271required.
270 272
271The semantics for atomic_cmpxchg are the same as those defined for 'cas' 273The semantics for atomic_cmpxchg are the same as those defined for 'cas'
272below. 274below.
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index 13feb697271f..18fc860df1be 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -2383,9 +2383,7 @@ about the state (old or new) implies an SMP-conditional general memory barrier
2383explicit lock operations, described later). These include: 2383explicit lock operations, described later). These include:
2384 2384
2385 xchg(); 2385 xchg();
2386 cmpxchg();
2387 atomic_xchg(); atomic_long_xchg(); 2386 atomic_xchg(); atomic_long_xchg();
2388 atomic_cmpxchg(); atomic_long_cmpxchg();
2389 atomic_inc_return(); atomic_long_inc_return(); 2387 atomic_inc_return(); atomic_long_inc_return();
2390 atomic_dec_return(); atomic_long_dec_return(); 2388 atomic_dec_return(); atomic_long_dec_return();
2391 atomic_add_return(); atomic_long_add_return(); 2389 atomic_add_return(); atomic_long_add_return();
@@ -2398,7 +2396,9 @@ explicit lock operations, described later). These include:
2398 test_and_clear_bit(); 2396 test_and_clear_bit();
2399 test_and_change_bit(); 2397 test_and_change_bit();
2400 2398
2401 /* when succeeds (returns 1) */ 2399 /* when succeeds */
2400 cmpxchg();
2401 atomic_cmpxchg(); atomic_long_cmpxchg();
2402 atomic_add_unless(); atomic_long_add_unless(); 2402 atomic_add_unless(); atomic_long_add_unless();
2403 2403
2404These are used for such things as implementing ACQUIRE-class and RELEASE-class 2404These are used for such things as implementing ACQUIRE-class and RELEASE-class