18c2ecf20Sopenharmony_ciC WRC+poonceonces+Once 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ci(* 48c2ecf20Sopenharmony_ci * Result: Sometimes 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * This litmus test is an extension of the message-passing pattern, 78c2ecf20Sopenharmony_ci * where the first write is moved to a separate process. Note that this 88c2ecf20Sopenharmony_ci * test has no ordering at all. 98c2ecf20Sopenharmony_ci *) 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci{} 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ciP0(int *x) 148c2ecf20Sopenharmony_ci{ 158c2ecf20Sopenharmony_ci WRITE_ONCE(*x, 1); 168c2ecf20Sopenharmony_ci} 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ciP1(int *x, int *y) 198c2ecf20Sopenharmony_ci{ 208c2ecf20Sopenharmony_ci int r0; 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci r0 = READ_ONCE(*x); 238c2ecf20Sopenharmony_ci WRITE_ONCE(*y, 1); 248c2ecf20Sopenharmony_ci} 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ciP2(int *x, int *y) 278c2ecf20Sopenharmony_ci{ 288c2ecf20Sopenharmony_ci int r0; 298c2ecf20Sopenharmony_ci int r1; 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci r0 = READ_ONCE(*y); 328c2ecf20Sopenharmony_ci r1 = READ_ONCE(*x); 338c2ecf20Sopenharmony_ci} 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ciexists (1:r0=1 /\ 2:r0=1 /\ 2:r1=0) 36