This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: check_dbra_loop
>>>>> "Fergus" == Fergus Henderson <fjh@cs.mu.oz.au> writes:
Fergus> As well as respecting `volatile', memory writes should IMHO
Fergus> also not be reordered across thread synchronization
Fergus> primitives.
Fergus> I don't know whether the standards are clear on this. The C
Fergus> standard doesn't say anything much about multithread.
Fergus> Unfortunately the description is divided between the Posix
Fergus> threads standard (which I don't have a copy of), and the C
Fergus> standard.
Does this discussion only affect C and C++? Java requires threads and
tries to define some of the semantics of interacting threads. This is
an area I haven't delved into too deeply, and I gather that currently
the Java spec gets some of this wrong. Regardless, I wonder what this
discussion means in the Java context. I assume we do have to worry
about gcc performing Java-unsafe optimizations. I don't know that
anybody has looked at this in detail. I know I haven't :-(
Tom