Is your system polluted?

Eugene Brooks brooks at maddog.llnl.gov
Tue Dec 26 18:59:15 AEST 1989


In article <PCG.89Dec25215018 at rupert.cs.aber.ac.uk> pcg at rupert.cs.aber.ac.uk (Piercarlo Grandi) writes:
>I agree 100%. I agree so much that then I can propose the
>equivalently safe, but almost 100% backward trick that makes the
>ridiculous volatile keyword useless without virtually loss in
>optimization ability and with abosulte safety:
The volatile keyword is not ridiculous, and it is very useful.
Its orginal domain, to support device register access where memory
values would change in a spontaneous way, has expanded to shared memory
multiprocessing.  I am sure that the ANSI committee did not have multiprocessing
in mind when they hatched volatile, but they did us a big favor with it.
It is best to not statically delcare a variable as volatile, however,
it is best to declare a specific reference volatile with a cast when
you need to be sure that the compile does not screw you.

brooks at maddog.llnl.gov, brooks at maddog.uucp



More information about the Comp.unix.wizards mailing list