Heads-up: volatile and C++
Nathan Sidwell
nathan@codesourcery.com
Sat Apr 16 22:37:00 GMT 2005
Jason Merrill wrote:
> On Thu, 14 Apr 2005 17:11:58 +0100, Nathan Sidwell <nathan@codesourcery.com> wrote:
>>Could you clarify whether 'other writes' means 'other _volatile_ writes',
>>or '_any_ other writes'? Since non-volatile writes are not visible
>>outside of the abstract machine, how can they be ordered wrt volatiles?
>
>
> Any others. I was basing that on the requirement that the side-effects of
> those writes are required to be complete, though I suppose you could argue
> that they aren't required to be visible outside the current thread.
Can you clarify whether threads are being considered as
a) parts of a single abstract machine (which will therefore need extending
in the std)
b) separate abstract machines.
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).
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
More information about the Gcc
mailing list