Volatile is Necessary

Tom Neff tneff at atpal.UUCP
Tue Mar 29 01:44:14 AEST 1988


In article <7569 at brl-smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) 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 



More information about the Comp.lang.c mailing list