Back to home page

OSCL-LXR

 
 

    


0001 C LB+poonceonces
0002 
0003 (*
0004  * Result: Sometimes
0005  *
0006  * Can the counter-intuitive outcome for the load-buffering pattern
0007  * be prevented even with no explicit ordering?
0008  *)
0009 
0010 {}
0011 
0012 P0(int *x, int *y)
0013 {
0014         int r0;
0015 
0016         r0 = READ_ONCE(*x);
0017         WRITE_ONCE(*y, 1);
0018 }
0019 
0020 P1(int *x, int *y)
0021 {
0022         int r0;
0023 
0024         r0 = READ_ONCE(*y);
0025         WRITE_ONCE(*x, 1);
0026 }
0027 
0028 exists (0:r0=1 /\ 1:r0=1)