lkml.org 
[lkml]   [2002]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: readl/writel and memory barriers
On Wed, Feb 20, 2002 at 09:05:37AM +1100, Keith Owens wrote:
> On Tue, 19 Feb 2002 10:35:06 -0800,
> Jesse Barnes <jbarnes@sgi.com> wrote:
> >Making a variable volatile doesn't guarantee that the compiler won't
> >reorder references to it, AFAIK.
>
> Ignoring the issue of hardware that reorders I/O, volatile accesses
> must not be reordered by the compiler. From a C9X draft (1999, anybody
> have the current C standard online?) :-

Of course volatile references must be ordered wrt each other, but a
reference to a volatile doesn't preclude the compiler from moving it
above or below accesses to other variables. That is, it doesn't act
as an optimization barrier. Sound right? I guess I'm getting a
little off-topic here...

Jesse
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:2.680 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site