Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

doc: Further updates to RCU's lockdep.rst

This commit wordsmiths RCU's lockdep.rst.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>

+6 -7
+6 -7
Documentation/RCU/lockdep.rst
··· 69 69 value of the pointer itself, for example, against NULL. 70 70 71 71 The rcu_dereference_check() check expression can be any boolean 72 - expression, but would normally include a lockdep expression. However, 73 - any boolean expression can be used. For a moderately ornate example, 74 - consider the following:: 72 + expression, but would normally include a lockdep expression. For a 73 + moderately ornate example, consider the following:: 75 74 76 75 file = rcu_dereference_check(fdt->fd[fd], 77 76 lockdep_is_held(&files->file_lock) || ··· 96 97 atomic_read(&files->count) == 1); 97 98 98 99 This would verify cases #2 and #3 above, and furthermore lockdep would 99 - complain if this was used in an RCU read-side critical section unless one 100 - of these two cases held. Because rcu_dereference_protected() omits all 101 - barriers and compiler constraints, it generates better code than do the 102 - other flavors of rcu_dereference(). On the other hand, it is illegal 100 + complain even if this was used in an RCU read-side critical section unless 101 + one of these two cases held. Because rcu_dereference_protected() omits 102 + all barriers and compiler constraints, it generates better code than do 103 + the other flavors of rcu_dereference(). On the other hand, it is illegal 103 104 to use rcu_dereference_protected() if either the RCU-protected pointer 104 105 or the RCU-protected data that it points to can change concurrently. 105 106