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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,470860aa3e635a7 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!news.tiscali.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.velia.net!news-fra1.dfn.de!storethat.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: GNAT for MS Visual Studio Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4xsl4zw3bp.fsf@hod.lan.m-e-leypold.de> <1191357491.860178.230380@22g2000hsm.googlegroups.com> <4702ADCC.7080209@obry.net> <1191439439.120567.172630@g4g2000hsf.googlegroups.com> <4703F02D.3030207@obry.net> <1191682021.844225.236870@g4g2000hsf.googlegroups.com> <4707A3D0.3070702@obry.net> <1tq0h0fb74sxe$.2ys0qzmfxcqo.dlg@40tude.net> <4707C0CC.1000108@obry.net> <1aa677sd3f3ox.k8awuo7pj13r.dlg@40tude.net> <1191702767.598768.210960@o80g2000hse.googlegroups.com> Date: Sun, 7 Oct 2007 09:35:03 +0200 Message-ID: <1aqbpv0czr253.wrmcd70o5se5$.dlg@40tude.net> NNTP-Posting-Date: 07 Oct 2007 09:35:07 CEST NNTP-Posting-Host: fe202c01.newsspool3.arcor-online.net X-Trace: DXC=\S23iMgY\ag]l@YUW5NBknMcF=Q^Z^V3h4Fo<]lROoRa^;5]aA^R6>b6bIf`kK7EQl[6LHn;2LCVn[ On Sat, 06 Oct 2007 13:32:47 -0700, in comp.lang.ada you wrote: > On 6 Pa , 20:30, "Dmitry A. Kazakov" > wrote: > >>> type Whatever is tagged record >>> ... >>> end record; >> >>> You can definitely read an object of type Whatever from multiple tasks. >>> You don't have to use a protected object. >> >>> You can also read the memory pointed to any access type from multiple >>> tasks. You don't have to use a protected object. >> >> AFAIK, ARM is silent about this. The most close reference is 9(8): >> >> "In addition, tasks can communicate indirectly by reading and updating >> (unprotected) shared variables, presuming the access is properly >> synchronized through some other kind of task interaction." > > Note that introducing some causal ordering (a.k.a. signalling) is > enough to make it safe. > > Consider a main task that populates the shared object *and then* > starts N tasks that concurrently read the shared data (the main task > does not interfere with the data anymore). There is a causal > relationship between populating and reading which is guaranteed by > task activation. See 9.10/4. The tasks can safely read the data. > > In other words, it is perfectly imaginable to set up a set of tasks > that concurrently read the same data without any additional hassle > like protected objects. So - Pascal is right that this is in principle > possible. > At the same time this is explicitly forbidden for containers. I don't see any difference for containers. When reads are synchronized (by whatever means) then everything is OK, so would be container reading. [ For protected objects, it seems that functions do not signal, so I guess it might be illegal to read a container component of a protected object from its function unless the compiler chooses another implementation for access from protected functions. This looks weird to me.] -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de