diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2018-05-15 02:33:50 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-05-15 09:11:17 +0300 |
commit | 8559183ccaec97454b2515ac426f113967256cf9 (patch) | |
tree | 6aee2f09189b0b9441ecfb3c399078158424fb71 /lib/llist.c | |
parent | 1bd3742043fa44dd0ec25770abdcdfe1f6e8681e (diff) | |
download | linux-8559183ccaec97454b2515ac426f113967256cf9.tar.xz |
tools/memory-model: Remove duplicated code from lock.cat
This patch simplifies the implementation of spin_is_locked in the
LKMM. It capitalizes on the fact that a failed spin_trylock() and a
spin_is_locked() which returns True have exactly the same semantics
(those of READ_ONCE) and ordering properties (none). Therefore the
two kinds of events can be combined and handled by the same code,
instead of treated separately as they are currently.
Tested-by: Andrea Parri <andrea.parri@amarulasolutions.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Akira Yokosawa <akiyks@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Jade Alglave <j.alglave@ucl.ac.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Luc Maranget <luc.maranget@inria.fr>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arch@vger.kernel.org
Cc: parri.andrea@gmail.com
Link: http://lkml.kernel.org/r/1526340837-12222-12-git-send-email-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib/llist.c')
0 files changed, 0 insertions, 0 deletions