Path: utzoo!mnetor!uunet!mcvax!enea!diab!pf From: pf@diab.UUCP (Per Fogelstr|m) Newsgroups: comp.lang.c Subject: Re: Volatile is Necessary Message-ID: <378@ma.diab.UUCP> Date: 29 Mar 88 07:31:23 GMT References: <12578@brl-adm.ARPA> <1988Mar25.172355.348@utzoo.uucp> <8107@sol.ARPA> <7569@brl-smoke.ARPA> Reply-To: pf@ma.UUCP (Per Fogelstr|m) Organization: Diab Data AB, Taby, Sweden Lines: 14 In article <7569@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >In article <8107@sol.ARPA> crowl@cs.rochester.edu (Lawrence Crowl) writes: >>shared-memory multiprocessors. Processes on such machines communicate via >>updates to a shared variables. > >You need a hell of a lot more than "volatile" to properly >synchronize concurrent processes. I don't beleive that "volatile" was intended to be a mechanisim for processor synchronization, rather a way to indicate that a "memory" location has side effects, for example when it's read. For those of You that don't normally do system and driver programming it's qite meaningless, but boy how nice it is to be able to use the -O switch when compiling a driver wich requires fast interrupt turnaround.