Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79269ee3 authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

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: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
parent f60cb4d4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;