home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.19 / text0059.txt < prev    next >
Encoding:
Internet Message Format  |  1990-05-17  |  893 b 

  1. From: Doug Gwyn <uunet!smoke.brl.mil!gwyn>
  2.  
  3. In article <622@longway.TIC.COM> Ronald Guilmette <uunet!ics.UCI.EDU!rfg> writes:
  4. >>The Posix committee apparently does not feel that it is reasonable to
  5. >>require the programmer to write "volatile" on nearly everything to
  6. >>insure correctness.
  7. >I don't yet know what the committe as a whole feels, but I can assure
  8. >everyone that attaching "volatile" to *everything* is not necessary.
  9.  
  10. Indeed, only shared variables need to be protected, and only within
  11. critical regions.  This can be enforced locally, without forcing the
  12. variables to be declared as volatile-qualified, through use of
  13. volatile-qualified type casts or block-scope temporary variables.
  14. This technique puts a considerable burden on the programmer, but hey,
  15. he's the one who needs to specify precisely what may be and must not
  16. be cached anyway..
  17.  
  18. Volume-Number: Volume 19, Number 59
  19.  
  20.