This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: question on volatile


Quoting Richard Henderson (rth@cygnus.com):
> On Fri, Nov 05, 1999 at 11:29:51AM +0100, Martin Kahlert wrote:
> > how can i be sure, that the compiler doesn't compile
> > it [ by rearranging stores ]
> >
> > Is it enough to make the runme field inside Arguments volatile?
> 
> For the compiler, yes, for the hardware, it depends.
> Does your hardware guarantee total memory ordering?
> Many do not.

Sorry to ask, but what exactly does total memory ordering mean?
When the compiler wrote all of its instructions to write
some data and (hopefully after that) writes to the
volatile variable, what can go wrong? Can the hardware delay
some writes in favor of others?

Thanks,
Martin.

-- 
The early bird gets the worm. If you want something else for       
breakfast, get up later.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]