Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!sri-spam!sri-unix!garth!walter From: walter@garth.UUCP (Walter Bays) Newsgroups: comp.lang.c Subject: Re: Volatile is Necessary Message-ID: <580@garth.UUCP> Date: 28 Mar 88 22:10:24 GMT References: <12578@brl-adm.ARPA> <1988Mar25.172355.348@utzoo.uucp> <8107@sol.ARPA> Reply-To: walter@garth.UUCP (Walter Bays) Organization: INTERGRAPH (APD) -- Palo Alto, CA Lines: 20 In article <8107@sol.ARPA> crowl@cs.rochester.edu (Lawrence Crowl) writes: >The `volatile' type qualifier of ANSI C has recently been criticized as a >frill. While this assertion is arguable for uniprocessors, it is not true for >shared-memory multiprocessors. [...] If there is no mechanism to >indicate when a variable referenced by one process may be modified by >another process, the compiler must assume that all variables may be >modified at any time. [...] This limits the optimizing effectiveness >of compilers substantially. [...] The 'volatile' keyword would also work for uniprocessor device drivers. How about setjmp()? Or side effects of functions with "dangerous" pointers? -- ------------------------------------------------------------------------------ Any similarities between my opinions and those of the person who signs my paychecks is purely coincidental. E-Mail route: ...!pyramid!garth!walter USPS: Intergraph APD, 2400 Geng Road, Palo Alto, California 94303 Phone: (415) 852-2384 ------------------------------------------------------------------------------