On Thu, 2006-07-06 at 07:59 -0400, linux-os (Dick Johnson) wrote: > On Thu, 6 Jul 2006, Ingo Molnar wrote: > > > > > * Linus Torvalds <[email protected]> wrote: > > > >> I wonder if we should remove the "volatile". There really isn't > >> anything _good_ that gcc can do with it, but we've seen gcc code > >> generation do stupid things before just because "volatile" seems to > >> just disable even proper normal working. > > Then GCC must be fixed. The keyword volatile is correct. It should > force the compiler to read the variable every time it's used. this is not really what the C standard says. > This is not pointless. If GCC generates bad code, tell the > GCC people. The volatile keyword is essential. no the "volatile" semantics are vague, trecherous and evil. It's a LOT better to insert the well defined "barrier()" in the right places. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [patch] spinlocks: remove 'volatile'
- From: Mark Lord <[email protected]>
- Re: [patch] spinlocks: remove 'volatile'
- From: "linux-os \(Dick Johnson\)" <[email protected]>
- Re: [patch] spinlocks: remove 'volatile'
- References:
- Re: [patch] uninline init_waitqueue_*() functions
- From: Ingo Molnar <[email protected]>
- Re: [patch] uninline init_waitqueue_*() functions
- From: Andrew Morton <[email protected]>
- Re: [patch] uninline init_waitqueue_*() functions
- From: Ingo Molnar <[email protected]>
- Re: [patch] uninline init_waitqueue_*() functions
- From: Andrew Morton <[email protected]>
- Re: [patch] uninline init_waitqueue_*() functions
- From: Linus Torvalds <[email protected]>
- Re: [patch] uninline init_waitqueue_*() functions
- From: Ingo Molnar <[email protected]>
- Re: [patch] uninline init_waitqueue_*() functions
- From: Linus Torvalds <[email protected]>
- Re: [patch] uninline init_waitqueue_*() functions
- From: Ingo Molnar <[email protected]>
- Re: [patch] uninline init_waitqueue_*() functions
- From: Linus Torvalds <[email protected]>
- Re: [patch] uninline init_waitqueue_*() functions
- From: Linus Torvalds <[email protected]>
- [patch] spinlocks: remove 'volatile'
- From: Ingo Molnar <[email protected]>
- Re: [patch] spinlocks: remove 'volatile'
- From: "linux-os \(Dick Johnson\)" <[email protected]>
- Re: [patch] uninline init_waitqueue_*() functions
- Prev by Date: Re: AVR32 architecture patch against Linux 2.6.18-rc1 available
- Next by Date: Re: AVR32 architecture patch against Linux 2.6.18-rc1 available
- Previous by thread: Re: [patch] spinlocks: remove 'volatile'
- Next by thread: Re: [patch] spinlocks: remove 'volatile'
- Index(es):