doc/atomic_ops: Clarify smp_mb__{before,after}_atomic()
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 19 Apr 2017 21:30:37 +0000 (14:30 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 8 Jun 2017 15:25:28 +0000 (08:25 -0700)
This commit explicitly states that surrounding a non-value-returning
atomic read-modify atomic operations provides full ordering, just as
is provided by value-returning atomic read-modify-write operations.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Documentation/core-api/atomic_ops.rst

index 55e43f1c80def81bbe3315ddb649a2d55f351d3c..fce929144ccdc3de876b94cff93bab7376845b02 100644 (file)
@@ -303,6 +303,11 @@ defined which accomplish this::
        void smp_mb__before_atomic(void);
        void smp_mb__after_atomic(void);
 
+Preceding a non-value-returning read-modify-write atomic operation with
+smp_mb__before_atomic() and following it with smp_mb__after_atomic()
+provides the same full ordering that is provided by value-returning
+read-modify-write atomic operations.
+
 For example, smp_mb__before_atomic() can be used like so::
 
        obj->dead = 1;