Messages in this thread | | | Date | Tue, 19 Feb 2002 14:17:04 -0800 | From | Jesse Barnes <> | Subject | Re: 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/
| |