]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
documentation: Add lockless_dereference()
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 17 Sep 2015 15:18:32 +0000 (08:18 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 6 Oct 2015 18:22:57 +0000 (11:22 -0700)
The recently added lockless_dereference() macro is not present in the
Documentation/ directory, so this commit fixes that.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Documentation/memory-barriers.txt

index d336e4d420297eb62c18bc171b98acb36451ac37..8e7cf9ad3db131c3f82621043fd7184ed025d088 100644 (file)
@@ -1710,6 +1710,17 @@ There are some more advanced barrier functions:
      operations" subsection for information on where to use these.
 
 
+ (*) lockless_dereference();
+     This can be thought of as a pointer-fetch wrapper around the
+     smp_read_barrier_depends() data-dependency barrier.
+
+     This is also similar to rcu_dereference(), but in cases where
+     object lifetime is handled by some mechanism other than RCU, for
+     example, when the objects removed only when the system goes down.
+     In addition, lockless_dereference() is used in some data structures
+     that can be used both with and without RCU.
+
+
  (*) dma_wmb();
  (*) dma_rmb();