RE: JavaMemoryModel: proposal for semantics & implementation on relaxed memory model machines

From: Bill Pugh (pugh@cs.umd.edu)
Date: Thu Jul 15 1999 - 15:53:19 EDT


At 2:46 PM -0400 7/15/99, Doug Lea wrote:
>Initialization issues aside, it is probably a good idea to change
>semantics of volatile in this way. I could then kill passages in
>CPJ/2e that warn people that accessing a volatile array variable does
>not automatically provide access to its elements. Which no matter how
>many times you tell people (including myself), is just too easy to
>escape even careful review and cause errors. (As a couple of people
>on this list will attest :-)

Of course, the simple implementation for this (put a read barrier
after each load of a volatile field) doesn't give you the semantics
you might want for a volatile field referencing an array of arrays of
X.

        Bill

-------------------------------
This is the JavaMemoryModel mailing list, managed by Majordomo 1.94.4.

To send a message to the list, email JavaMemoryModel@cs.umd.edu
To send a request to the list, email majordomo@cs.umd.edu and put
your request in the body of the message (use the request "help" for help).
For more information, visit http://www.cs.umd.edu/~pugh/java/memoryModel



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