volatile: is NOT a frill, i
gillies at uiucdcsp.cs.uiuc.edu
gillies at uiucdcsp.cs.uiuc.edu
Sun Apr 10 03:22:00 AEST 1988
That's a very good point: Since volatile is so machine/application
specific (do I need it on a stack machine? unlikely!) It may be a
bad idea to nail it down in a particular way. For instance:
1. Do we want volatile to apply to individual variables?
2. Or would the programmer rather have a directive that makes a clump of
variables volatile? After all, it's a pain to make an entire
module "volatile"
3. Perhaps we want to have stretches of code that are "volatile",
(The HP method?) and in other places allow the variables to live in
registers or whatever.
4. I'm sure you can imagine useful applications for the other situations.
Can you honestly predict what these shared-memory multiprocessing guys
really need? Will they have to reimplement the feature themselves?
If so, then the answer is : Do not put it in.
Don Gillies {ihnp4!uiucdcs!gillies} U of Illinois
{gillies at p.cs.uiuc.edu}
More information about the Comp.lang.c
mailing list