Path: utzoo!attcan!uunet!husc6!bbn!rochester!pt.cs.cmu.edu!sei!sei.cmu.edu!firth From: firth@sei.cmu.edu (Robert Firth) Newsgroups: comp.lang.c Subject: Re: volatile, shared memory, and synchronisation Message-ID: <5576@aw.sei.cmu.edu> Date: 24 May 88 22:27:06 GMT References: <20345@pyramid.pyramid.com> <833@mcdsun.UUCP> <9916@tekecs.TEK.COM> <199@gannet.cl.cam.ac.uk> <11629@mimsy.UUCP> Sender: netnews@sei.cmu.edu Reply-To: firth@bd.sei.cmu.edu.UUCP (Robert Firth) Organization: Carnegie-Mellon University, SEI, Pgh, Pa Lines: 18 In article <11629@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: [ volatile variables are still vulnerable to the "interrupted update" error] >Volatility is only part of what you need for synchronisation. It might be worth pointing out that the Ada programming language provides the pragma "Shared" to indicate shared variables. The language reference manual says [RM 9.11 (11)] An implementation must restrict the objects for which the pragma SHARED is allowed to objects for which each of direct reading and direct updating is implemented as an indivisible operation. I believe this captures the required semantics. (Of course, the RM also explains you can't slave local copies &c either)