CoWR+poonceonce+Once.litmus 324 B

12345678910111213141516171819202122232425
  1. C CoWR+poonceonce+Once
  2. (*
  3. * Result: Never
  4. *
  5. * Test of write-read coherence, that is, whether or not a write to a
  6. * given variable and a later read from that same variable are ordered.
  7. *)
  8. {}
  9. P0(int *x)
  10. {
  11. int r0;
  12. WRITE_ONCE(*x, 1);
  13. r0 = READ_ONCE(*x);
  14. }
  15. P1(int *x)
  16. {
  17. WRITE_ONCE(*x, 2);
  18. }
  19. exists (x=1 /\ 0:r0=2)