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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM 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!postnews.google.com!o80g2000hse.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: GNAT for MS Visual Studio Date: Sat, 06 Oct 2007 13:32:47 -0700 Organization: http://groups.google.com Message-ID: <1191702767.598768.210960@o80g2000hse.googlegroups.com> 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> NNTP-Posting-Host: 85.3.206.194 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1191702767 22397 127.0.0.1 (6 Oct 2007 20:32:47 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 6 Oct 2007 20:32:47 +0000 (UTC) In-Reply-To: <1aa677sd3f3ox.k8awuo7pj13r.dlg@40tude.net> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.0.1) Gecko/20060317 Firefox/1.5.0.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: o80g2000hse.googlegroups.com; posting-host=85.3.206.194; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:2331 Date: 2007-10-06T13:32:47-07:00 List-Id: 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. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com