Skip to content

Commit 13a9a11

Browse files
akiykspaulmckrcu
authored andcommitted
tools/memory-model: docs/README: Update introduction of locking.txt
Commit 9bc931e ("tools/memory-model: Add locking.txt and glossary.txt to README") failed to mention the relation of the "Locking" section in recipes.txt and locking.txt. The latter is a detailed version of the former intended to be read on its own. Reword the description in README and add notes in locking.txt and recipes.txt to clarify their relationship. [ paulmck: Wordsmithing. ] Signed-off-by: Akira Yokosawa <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Acked-by: Andrea Parri <[email protected]>
1 parent 0af2f6b commit 13a9a11

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

tools/memory-model/Documentation/README

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ o You are familiar with the Linux-kernel concurrency primitives
2323
that you need, and just want to get started with LKMM litmus
2424
tests: litmus-tests.txt
2525

26-
o You would like to access lock-protected shared variables without
27-
having their corresponding locks held: locking.txt
26+
o You need to locklessly access shared variables that are otherwise
27+
protected by a lock: locking.txt
28+
29+
This locking.txt file expands on the "Locking" section in
30+
recipes.txt, but is self-contained.
2831

2932
o You are familiar with Linux-kernel concurrency, and would
3033
like a detailed intuitive understanding of LKMM, including

tools/memory-model/Documentation/locking.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
[!] Note:
2+
This file expands on the "Locking" section of recipes.txt,
3+
focusing on locklessly accessing shared variables that are
4+
otherwise protected by a lock.
5+
16
Locking
27
=======
38

tools/memory-model/Documentation/recipes.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ usual) some things to be careful of:
6161
Locking
6262
-------
6363

64+
[!] Note:
65+
locking.txt expands on this section, providing more detail on
66+
locklessly accessing lock-protected shared variables.
67+
6468
Locking is well-known and straightforward, at least if you don't think
6569
about it too hard. And the basic rule is indeed quite simple: Any CPU that
6670
has acquired a given lock sees any changes previously seen or made by any

0 commit comments

Comments
 (0)