Path: utzoo!mnetor!uunet!pwcmrd!skipnyc!atpal!tneff From: tneff@atpal.UUCP (Tom Neff) Newsgroups: comp.lang.c Subject: Re: Volatile is Necessary Message-ID: <119@atpal.UUCP> Date: 28 Mar 88 15:44:14 GMT References: <12578@brl-adm.ARPA> <1988Mar25.172355.348@utzoo.uucp> <8107@sol.ARPA> <7569@brl-smoke.ARPA> Reply-To: tneff@atpal.UUCP (Tom Neff) Organization: Rational Technologies, Inc. Lines: 16 Summary: You need more, but not from the language itself In article <7569@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >You need a hell of a lot more than "volatile" to properly >synchronize concurrent processes. You do, but not from the language itself! Just about everything else you need for multiprocessing, you can write yourself as external support routines. Interrupt handlers and volatile variables are all the language has to give you. Fortunately most implementations have some sort of interrupt extension, but even where there isn't one you can write an assembly-language front end to call your "C" handler cleanly. It's not that simple with the shared variables (or memory mapped I/O, which is just as prevalent) - you really need some help from the compiler to do things efficiently. TMN -- Tom Neff