Ken Raeburn wrote:
On Apr 16, 2005, at 15:45, Nathan Sidwell wrote:
It's not clear to me which is the best approach. (b) allows threads to
be supported via copious uses of volatile (but probably introduces
pessimizations), whereas (a) forces the thread interactions to be
compiler
visible (but shows more promise for optimizations).
Is there anything in the language specifications (mainly C++ in this
context, but is this an area where C and C++ are going to diverge, or is
C likely to follow suit?) that prohibits spurious writes to a location?
Surely the deal is that spurious writes are allowed unless the
location is volatile. What other interpretation is possible?