Back to home page

OSCL-LXR

 
 

    


0001 C S+fencewmbonceonce+poacquireonce
0002 
0003 (*
0004  * Result: Never
0005  *
0006  * Can a smp_wmb(), instead of a release, and an acquire order a prior
0007  * store against a subsequent store?
0008  *)
0009 
0010 {}
0011 
0012 P0(int *x, int *y)
0013 {
0014         WRITE_ONCE(*x, 2);
0015         smp_wmb();
0016         WRITE_ONCE(*y, 1);
0017 }
0018 
0019 P1(int *x, int *y)
0020 {
0021         int r0;
0022 
0023         r0 = smp_load_acquire(y);
0024         WRITE_ONCE(*x, 1);
0025 }
0026 
0027 exists (x=2 /\ 1:r0=1)