Re: JavaMemoryModel: New Unified JMM Description

From: Jeremy Manson (jmanson@cs.umd.edu)
Date: Wed Apr 14 2004 - 10:00:07 EDT


[cc list trimmed because all of those people are on the JMM list anyway]

>
> "There is a happens-before edge from the write of the
> default value (zero, false or null)
> of each variable to the first action in every thread."
>
> As it is written, the happens-before edges can be
> cyclic. I think that the meaning was that there is an
> edge from the default value to the first access of
> that variable in every thread.
>

That depends on where one imagines that the write of the default value
actually occurs. We think of it as an "outside the thread in which is was
constructed" action, because if we had:

Thread 1:
x = 1;
y = default;

Thread 2:
r1 = y
r2 = x

And then we said that there was a happens-before edge from the write of the
default value to the read of y, then the read of x would have to see 1.
This is not our intent.

It is probably worth clarifying this, though.

                                        Jeremy
-------------------------------
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