Documentation/litmus-tests: Make cmpxchg() tests safe for klitmus
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 8 Apr 2024 20:41:22 +0000 (13:41 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 6 May 2024 21:29:21 +0000 (14:29 -0700)
commit2ba5b4130e3d5d05c95981e1d2e660d57e613fda
tree9c64fc5b63d59195a218e2a57805333cb3342706
parentd372e20433cbc0b0e3e59c89ccb6618501fcf6af
Documentation/litmus-tests: Make cmpxchg() tests safe for klitmus

The four litmus tests in Documentation/litmus-tests/atomic do not
declare all of their local variables.  Although this is just fine for LKMM
analysis by herd7, it causes build failures when run in-kernel by klitmus.
This commit therefore adjusts these tests to declare all local variables.

Reported-by: Andrea Parri <parri.andrea@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Acked-by: Andrea Parri <parri.andrea@gmail.com>
Documentation/litmus-tests/atomic/cmpxchg-fail-ordered-1.litmus
Documentation/litmus-tests/atomic/cmpxchg-fail-ordered-2.litmus
Documentation/litmus-tests/atomic/cmpxchg-fail-unordered-1.litmus
Documentation/litmus-tests/atomic/cmpxchg-fail-unordered-2.litmus