Re: [PATCH] [2.5] asm-generic/atomic.h and changes to arm, parisc, mips, m68k, sh, cris to use it
From: Luca Barbieri (ldb@ldb.ods.org)
Date: Mon Aug 12 2002 - 07:03:41 EST
- Next message: Daniel Egger: "Re: mmapping large files hits swap in 2.4?"
- Previous message: Mel: "Re: [ANNOUNCE] VM Regress - A VM regression and test tool"
- In reply to: David Woodhouse: "Re: [PATCH] [2.5] asm-generic/atomic.h and changes to arm, parisc, mips, m68k, sh, cris to use it"
- Next in thread: Roman Zippel: "Re: [PATCH] [2.5] asm-generic/atomic.h and changes to arm, parisc, mips, m68k, sh, cris to use it"
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
On Mon, 2002-08-12 at 13:16, David Woodhouse wrote:
>
> 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.
I noticed that while testing how rmk's code behaved differently than
mine (and corrected in the v2 patch).
Before that, I just assumed that since the CPU must anyway issue a
separate load and store, the compiler would use the faster instruction
(that's why there is a LOCK prefix in the i386 instruction set).
-
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/
- Next message: Daniel Egger: "Re: mmapping large files hits swap in 2.4?"
- Previous message: Mel: "Re: [ANNOUNCE] VM Regress - A VM regression and test tool"
- In reply to: David Woodhouse: "Re: [PATCH] [2.5] asm-generic/atomic.h and changes to arm, parisc, mips, m68k, sh, cris to use it"
- Next in thread: Roman Zippel: "Re: [PATCH] [2.5] asm-generic/atomic.h and changes to arm, parisc, mips, m68k, sh, cris to use it"
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
This archive was generated by hypermail 2b29
: Thu Aug 15 2002 - 22:00:27 EST