Explorar o código

Documentation: Memory barrier semantics of atomic_xchg()

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>
Richard Braun %!s(int64=13) %!d(string=hai) anos
pai
achega
7e8b1e78ea
Modificáronse 2 ficheiros con 3 adicións e 0 borrados
  1. 2 0
      Documentation/atomic_ops.txt
  2. 1 0
      Documentation/memory-barriers.txt

+ 2 - 0
Documentation/atomic_ops.txt

@@ -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
 the given new value.  It returns the old value that the atomic variable v had
 just before the operation.
 just before the operation.
 
 
+atomic_xchg requires explicit memory barriers around the operation.
+
 	int atomic_cmpxchg(atomic_t *v, int old, int new);
 	int atomic_cmpxchg(atomic_t *v, int old, int new);
 
 
 This performs an atomic compare exchange operation on the atomic value v,
 This performs an atomic compare exchange operation on the atomic value v,

+ 1 - 0
Documentation/memory-barriers.txt

@@ -1685,6 +1685,7 @@ explicit lock operations, described later).  These include:
 
 
 	xchg();
 	xchg();
 	cmpxchg();
 	cmpxchg();
+	atomic_xchg();
 	atomic_cmpxchg();
 	atomic_cmpxchg();
 	atomic_inc_return();
 	atomic_inc_return();
 	atomic_dec_return();
 	atomic_dec_return();