From: Paul E. McKenney Date: Thu, 17 Sep 2015 15:18:32 +0000 (-0700) Subject: documentation: Add lockless_dereference() X-Git-Tag: v4.4-rc1~158^2~2^2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad2ad5d31f90fc6fb269e9be244224cecfc8b400;p=thirdparty%2Fkernel%2Flinux.git documentation: Add lockless_dereference() The recently added lockless_dereference() macro is not present in the Documentation/ directory, so this commit fixes that. Reported-by: Dmitry Vyukov Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett --- diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index d336e4d420297..8e7cf9ad3db13 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt @@ -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();