volatile (in comp.lang.c)

David Collier-Brown daveb at geac.UUCP
Tue May 3 05:57:12 AEST 1988


In article <2114 at winchester.mips.COM> mash at winchester.UUCP (John Mashey) writes:
| As I thought I'd mentioned before, the most immediate cause of wanting
| volatile has nothing to do with computer architecture in the sense of
| 1), or OS theory/practice in the sense of 2), but the very simple,
| practical reason, that in an open systems design, using a standard
| bus, and buying off-the-shelf controllers, you will discover that
| many such controllers, otherwise desirable, use memory as
| a communication mechanism. 

   Agreed.  I was asking an architecture/theory question, in hopes
of invalidating part of the problem.  And it is a real problem:
there is nothing improper or undesirable in using a portion of the
address space for special purposes.  Adding volatile or equivalent
directives to languages is a perfectly reasonable tradeoff,
expecially if the alternative is to break off a part of the address
space for "i/o ports" as some microcomputer manufacturers do.

  Thats why I addressed it to the architects.  I know why I'd need
it as a programmer: (a).  Or I can use (b) and write a
very-machine-specific driver using lots of source-to-source
transformations.  I've written drivers in GMAP.  Never again!

 --dave c-b
-- 
 David Collier-Brown.                 {mnetor yunexus utgpu}!geac!daveb
 Geac Computers International Inc.,   |  Computer Science loses its
 350 Steelcase Road,Markham, Ontario, |  memory (if not its mind) 
 CANADA, L3R 1B3 (416) 475-0525 x3279 |  every 6 months.



More information about the Comp.lang.c mailing list