From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,INVALID_DATE, UNRESOLVED_TEMPLATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!mailrus!uwmcsd1!ig!agate!ucbvax!CIRCUS.LLNL.GOV!IVANOVIC%VAXR From: IVANOVIC%VAXR@CIRCUS.LLNL.GOV ("Vladimir Ivanovic, x3-7786") Newsgroups: comp.lang.ada Subject: Pragma SHARED, tasks and shared variables Message-ID: <8807280055.AA27279@ajpo.sei.cmu.edu> Date: 28 Jul 88 01:03:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet List-Id: Can anyone answer the following question: If I specify that every read or update to an variable whose type is an access type is a synchronization point for that variable by using the pragma SHARED and naming that variable [LRM 9.11(7)], can I be assured that the object designated by that variable will never be a local copy of that object? My intent is to get around the restrictions imposed by LRM 9.11(3) and 9.11(8) by having shared data structures whose types are not restricted to scalar and access types. My motivation is performance. I cannot afford the CPU strokes that encapsulating the data structures in a task and performing rendezvous with that task to access the data would cost. (And I cannot afford a faster CPU...) I realize that my particular implementation (VAX Ada v1.4) allows the use of pragma VOLATILE which is the same as pragma SHARED without the words "and whose type is a scalar or access type", essentially giving me what I want, but pragma VOLATILE is not portable across implementations.