1 C MP+onceassign+derefonce
6 * This litmus test demonstrates that rcu_assign_pointer() and
7 * rcu_dereference() suffice to ensure that an RCU reader will not see
8 * pre-initialization garbage when it traverses an RCU-protected data
9 * structure containing a newly inserted element.
18 P0(int *x, int **p) // Producer
21 rcu_assign_pointer(*p, x);
24 P1(int *x, int **p) // Consumer
30 r0 = rcu_dereference(*p);
35 exists (1:r0=x /\ 1:r1=0) (* Bad outcome. *)