[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070512191723.GA22380@gallifrey>
Date: Sat, 12 May 2007 20:17:24 +0100
From: "Dr. David Alan Gilbert" <linux@...blig.org>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] "volatile considered harmful", take 3
* H. Peter Anvin (hpa@...or.com) wrote:
> Satyam Sharma wrote:
> >
> > Because volatile is ill-defined? Or actually, *undefined* (well,
> > implementation-defined is as good as that)? It's *so* _vague_,
> > one doesn't _feel_ like using it at all!
> >
>
> Sorry, that's just utter crap. Linux isn't written in some mythical C
> which only exists in standard document, it is written in a particular
> subset of GNU C. "volatile" is well enough defined in that context, it
> is just frequently misused.
Where? I don't ever recall seeing something that defines Gcc's behaviour
with volatile on different architectures.
I know on some architectures gcc generates different instructions
for volatile accesses (e.g. load acquire/store release on IA64); I'd
be pleasently surprised if gcc's behaviour was consistent accross
architectures.
Dave
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux on Alpha,68K| Happy \
\ gro.gilbert @ treblig.org | MIPS,x86,ARM,SPARC,PPC & HPPA | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists