MP+poonceonces.litmus 319 B

123456789101112131415161718192021222324252627
  1. C MP+poonceonces
  2. (*
  3. * Result: Maybe
  4. *
  5. * Can the counter-intuitive message-passing outcome be prevented with
  6. * no ordering at all?
  7. *)
  8. {}
  9. P0(int *x, int *y)
  10. {
  11. WRITE_ONCE(*x, 1);
  12. WRITE_ONCE(*y, 1);
  13. }
  14. P1(int *x, int *y)
  15. {
  16. int r0;
  17. int r1;
  18. r0 = READ_ONCE(*y);
  19. r1 = READ_ONCE(*x);
  20. }
  21. exists (1:r0=1 /\ 1:r1=0)