mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* New locking test for the paulmckrcu/litmus github archive
@ 2024-06-05 14:47 Alan Stern
  2024-06-05 18:25 ` Paul E. McKenney
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Stern @ 2024-06-05 14:47 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: Andrea Parri, will, peterz, boqun.feng, npiggin, dhowells,
	j.alglave, luc.maranget, akiyks, dlustig, joel, linux-kernel,
	hernan.poncedeleon, jonas.oberhauser

Paul:

Below is a new litmus test for the manual/locked directory in your 
github archive.  It is based on a suggestion from Andrea Parri, and it 
demonstrates a bug in the current LKMM lock.cat file.  Patches to fix 
that file will be sent shortly.

Alan

---

C islocked+lock+islocked+unlock+islocked.litmus

(*
 * Result: Always
 *
 * This tests the memory model's implementation of spin_is_locked().
 *)

{}

P0(spinlock_t *x)
{
        int r0;
	int r1;
	int r2;

	r0 = spin_is_locked(x);
	spin_lock(x);
	r1 = spin_is_locked(x);
	spin_unlock(x);
	r2 = spin_is_locked(x);
}

exists (0:r0=0 /\ 0:r1=1 /\ 0:r2=0)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-06-06 19:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-05 14:47 New locking test for the paulmckrcu/litmus github archive Alan Stern
2024-06-05 18:25 ` Paul E. McKenney
2024-06-05 18:40   ` Alan Stern
2024-06-06 17:07     ` Paul E. McKenney
2024-06-06 17:21       ` Alan Stern
2024-06-06 17:57         ` Paul E. McKenney
2024-06-06 18:52           ` Alan Stern
2024-06-06 19:00             ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®