On Fri, Oct 21, 2005 at 06:09:00PM -0400, Tom Lane wrote:
> BTW, we may be perfectly safe on architectures like PPC, where
> S_UNLOCK includes an __asm__ __volatile__ section for a hardware-level
> optimization fence instruction.  I wonder though if it'd be a good idea
> to be marking those fence instructions with the "clobbers memory"
> qualifier to ensure this?

Judging by the comments in the linux kernel w.r.t their barrier()
instruction, there are certain versions of gcc that (incorrectly) do
strange things with the "volatile" tag of asm statements. Cloberring
memory is the way to guarentee what you want...

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment: pgpPYyXvqScdQ.pgp
Description: PGP signature

Reply via email to