C C-Figure8.litmus

{
}

P0(int *a, int *d)
{
	rcu_read_lock();
	WRITE_ONCE(*a, 1);
	WRITE_ONCE(*d, 1);
	rcu_read_unlock();
}

P1(int *a, int *b)
{
	r1 = READ_ONCE(*a);
	synchronize_rcu();
	WRITE_ONCE(*b, 1);
}

P2(int *b, int *d)
{
	rcu_read_lock();
	r1 = READ_ONCE(*b);
	r2 = READ_ONCE(*d);
	rcu_read_unlock();
}

P3(int *d, int *e)
{
	r1 = READ_ONCE(*d);
	synchronize_rcu();
	WRITE_ONCE(*e, 1);
}

P4(int *e, int *a)
{
	rcu_read_lock();
	r1 = READ_ONCE(*e);
	r2 = READ_ONCE(*a);
	rcu_read_unlock();
}

exists
(1:r1=1 /\ 2:r1=1 /\ 2:r2=0 /\ 3:r1=1 /\ 4:r1=1 /\ 4:r2=0)
(* 1:r1=1 /\ 2:r1=1 /\ 2:r2=0 *)
(* 3:r1=1 /\ 4:r1=1 /\ 4:r2=0 *)
