tools/memory-model: Document locking corner cases
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 14 Aug 2020 23:14:34 +0000 (16:14 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 24 Mar 2023 17:22:25 +0000 (10:22 -0700)
commit7e7eb5ae4e4cd482a1ebc6a82ea8a04c5ead62ee
tree81ec8404ff290bda113be2858064ba76bceddf70
parentfe15c26ee26efa11741a7b632e9f23b01aca4cc6
tools/memory-model:  Document locking corner cases

Most Linux-kernel uses of locking are straightforward, but there are
corner-case uses that rely on less well-known aspects of the lock and
unlock primitives.  This commit therefore adds a locking.txt and litmus
tests in Documentation/litmus-tests/locking to explain these corner-case
uses.

[ paulmck: Apply Andrea Parri feedback for klitmus7. ]
[ paulmck: Apply Akira Yokosawa example-consistency feedback. ]

Reviewed-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Documentation/litmus-tests/locking/DCL-broken.litmus [new file with mode: 0644]
Documentation/litmus-tests/locking/DCL-fixed.litmus [new file with mode: 0644]
Documentation/litmus-tests/locking/RM-broken.litmus [new file with mode: 0644]
Documentation/litmus-tests/locking/RM-fixed.litmus [new file with mode: 0644]
tools/memory-model/Documentation/locking.txt [new file with mode: 0644]