Re: [PATCH] [2.5] asm-generic/atomic.h and changes to arm, parisc, mips, m68k, sh, cris to use it

From: David Woodhouse (dwmw2@infradead.org)
Date: Mon Aug 12 2002 - 06:16:48 EST


alan@lxorguk.ukuu.org.uk said:
> Possibly not - volatile doesnt guarantee the compiler won't do
> x = 1
> add *p into x
> store x into *p

Er, AIUI 'volatile' guarantees that '*p++' will do precisely that. It's a
load, an add and a store, and the rules about volatile mean that the load
and the store _must_ be separate.

--
dwmw2

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 15 2002 - 22:00:27 EST