CoRR+poonceonce+Once.litmus 311 B

1234567891011121314151617181920212223242526
  1. C CoRR+poonceonce+Once
  2. (*
  3. * Result: Never
  4. *
  5. * Test of read-read coherence, that is, whether or not two successive
  6. * reads from the same variable are ordered.
  7. *)
  8. {}
  9. P0(int *x)
  10. {
  11. WRITE_ONCE(*x, 1);
  12. }
  13. P1(int *x)
  14. {
  15. int r0;
  16. int r1;
  17. r0 = READ_ONCE(*x);
  18. r1 = READ_ONCE(*x);
  19. }
  20. exists (1:r0=1 /\ 1:r1=0)