Skip to content

Commit 058cc23

Browse files
mchehabpaulmckrcu
authored andcommitted
docs: RCU: Convert lockdep.txt to ReST
- Add a SPDX header; - Adjust document title; - Mark literal blocks as such; - Add it to RCU/index.rst. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent a3b0a79 commit 058cc23

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Documentation/RCU/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ RCU concepts
1111

1212
arrayRCU
1313
checklist
14+
lockdep
1415
lockdep-splat
1516
rcubarrier
1617
rcu_dereference

Documentation/RCU/lockdep.txt renamed to Documentation/RCU/lockdep.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
========================
14
RCU and lockdep checking
5+
========================
26

37
All flavors of RCU have lockdep checking available, so that lockdep is
48
aware of when each task enters and leaves any flavor of RCU read-side
@@ -8,7 +12,7 @@ tracking to include RCU state, which can sometimes help when debugging
812
deadlocks and the like.
913

1014
In addition, RCU provides the following primitives that check lockdep's
11-
state:
15+
state::
1216

1317
rcu_read_lock_held() for normal RCU.
1418
rcu_read_lock_bh_held() for RCU-bh.
@@ -63,7 +67,7 @@ checking of rcu_dereference() primitives:
6367
The rcu_dereference_check() check expression can be any boolean
6468
expression, but would normally include a lockdep expression. However,
6569
any boolean expression can be used. For a moderately ornate example,
66-
consider the following:
70+
consider the following::
6771

6872
file = rcu_dereference_check(fdt->fd[fd],
6973
lockdep_is_held(&files->file_lock) ||
@@ -82,7 +86,7 @@ RCU read-side critical sections, in case (2) the ->file_lock prevents
8286
any change from taking place, and finally, in case (3) the current task
8387
is the only task accessing the file_struct, again preventing any change
8488
from taking place. If the above statement was invoked only from updater
85-
code, it could instead be written as follows:
89+
code, it could instead be written as follows::
8690

8791
file = rcu_dereference_protected(fdt->fd[fd],
8892
lockdep_is_held(&files->file_lock) ||
@@ -105,7 +109,7 @@ false and they are called from outside any RCU read-side critical section.
105109

106110
For example, the workqueue for_each_pwq() macro is intended to be used
107111
either within an RCU read-side critical section or with wq->mutex held.
108-
It is thus implemented as follows:
112+
It is thus implemented as follows::
109113

110114
#define for_each_pwq(pwq, wq)
111115
list_for_each_entry_rcu((pwq), &(wq)->pwqs, pwqs_node,

0 commit comments

Comments
 (0)