Re: JavaMemoryModel: Definition of volatile revisited

From: Jeremy Manson (
Date: Mon Mar 22 2004 - 10:23:05 EST

Vijay -

> So it seems to me that we need a total order on writes to volatile
> variables. Hasnt this been discussed before? Why the change to the
> current language then?

Neither the strong nor weak semantics being discussed allow the
undesirable result you mooted. Our semantics, and those that we and Sarita
have proposed in the past, have this total order.

Ours currently has a total order over all volatile accesses, called a
synchronization order (that has to reflect program order). Each volatile
read is constrained to see the last write to that volatile in the
synchronization order.

JavaMemoryModel mailing list -

This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:01:01 EDT