At 02:55 PM 13/04/2004 -0400, Bill Pugh wrote:
>OK, we're going to have to adjust this.
>Jeremy, Sarita and I are working on something, give us another day
>or so to sanity check it.
>The intent is still the same:
>* Not require any thread scheduling fairness
>* Prevent transformations such as hoisting
> a volatile read out of a loop (in the general
Just a general musing from me. It seems that the constraints that apply to
hoisting a volatile read out of a loop should be the same as that for
hoisting any other read out of a loop, and indeed, the same constraint that
applies to merging multiple reads whether volatile or not, into a single read.
This transformation is not permitted if it removes a happens-before
relationship between a write and a read of the same field.
In the case of the volatile read in a loop, hoisting it is permissible if
it can otherwise be proved that they all see the same write anyway.
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:01:04 EDT