[concurrency-interest] check that volatile stores are not reordered with volatile loads
oleksandr.otenko at oracle.com
Tue Dec 2 10:50:24 EST 2014
The following proves volatile stores and loads form a total order.
Thread 3: x=1
Thread 4: y=1
You shall never observe (r1,r2,r3,r4) = (1,0,1,0)
You can build a similar proof for intra-thread reordering:
You shall never observe (r1,r2)=(0,0)
You shall never observe (r1,r3)=(1,1)
On 02/12/2014 03:09, DT wrote:
> How can we check/prove (use case) that java guarantees that volatile
> stores are not reordered with volatile loads?
> Any points to the code will be grateful.
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
More information about the Concurrency-interest