diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2017-04-19 14:30:37 -0700 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2017-05-16 15:51:56 -0700 |
commit | a79b322d4b8889915aa86340ec0d41c151445231 (patch) | |
tree | 458a43506892155681b5c439de122a7ce4bca979 /Documentation/core-api | |
parent | 65574958d5922ec2387c252e8abff26fd968d37d (diff) | |
download | linux-next-a79b322d4b8889915aa86340ec0d41c151445231.tar.gz |
doc/atomic_ops: Clarify smp_mb__{before,after}_atomic()
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>
Diffstat (limited to 'Documentation/core-api')
-rw-r--r-- | Documentation/core-api/atomic_ops.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/core-api/atomic_ops.rst b/Documentation/core-api/atomic_ops.rst index 55e43f1c80de..fce929144ccd 100644 --- a/Documentation/core-api/atomic_ops.rst +++ b/Documentation/core-api/atomic_ops.rst @@ -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; |