]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Documentation: Memory barrier semantics of atomic_xchg()
authorRichard Braun <rbraun@sceen.net>
Thu, 13 Dec 2012 10:07:32 +0000 (11:07 +0100)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 8 Jan 2013 22:14:55 +0000 (14:14 -0800)
Add atomic_xchg() to documentation for atomic operations and
memory barriers.

Signed-off-by: Richard Braun <rbraun@sceen.net>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Documentation/atomic_ops.txt
Documentation/memory-barriers.txt

index 27f2b21a9d5cd5e040da0ab0e9cb9abbb69296a6..d9ca5be9b471d18d7c2640625d4845f9da8ff23a 100644 (file)
@@ -253,6 +253,8 @@ This performs an atomic exchange operation on the atomic variable v, setting
 the given new value.  It returns the old value that the atomic variable v had
 just before the operation.
 
+atomic_xchg requires explicit memory barriers around the operation.
+
        int atomic_cmpxchg(atomic_t *v, int old, int new);
 
 This performs an atomic compare exchange operation on the atomic value v,
index 3c4e1b3b80a1f8036a8b220ddcd0210d167c62b6..fa5d8a9ae2051184ddba6ce3d1dd769414d2e59f 100644 (file)
@@ -1685,6 +1685,7 @@ explicit lock operations, described later).  These include:
 
        xchg();
        cmpxchg();
+       atomic_xchg();
        atomic_cmpxchg();
        atomic_inc_return();
        atomic_dec_return();