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,eed7a24b26e16574 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!postnews.google.com!c36g2000prc.googlegroups.com!not-for-mail From: micronian2@gmail.com Newsgroups: comp.lang.ada Subject: Re: Quick Protected Object question Date: Tue, 9 Dec 2008 11:59:54 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <7d83cfa9-a97c-4a74-8202-c15035d607fa@j39g2000yqn.googlegroups.com> NNTP-Posting-Host: 199.46.149.168 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1228852794 28816 127.0.0.1 (9 Dec 2008 19:59:54 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 9 Dec 2008 19:59:54 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: c36g2000prc.googlegroups.com; posting-host=199.46.149.168; posting-account=tXrPSAkAAAAFR3M1xqoK7TQdrNxOfPT0 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:2947 Date: 2008-12-09T11:59:54-08:00 List-Id: On Dec 8, 5:43=A0am, Ludovic Brenta wrote: > On Dec 8, 2:34 pm, markp wrote: > > > > > I have a very quick protected object question. In a standard proected > > object setup as follows: > > > protected Test is > > =A0 =A0procedure A; > > =A0 =A0procedure B; > > private > > =A0 =A0Z : integer :=3D 0; > > end Test; > > > protected body Test is > > =A0 =A0procedure A is > > =A0 =A0begin > > =A0 =A0 =A0 < set of statements> > > =A0 =A0end A; > > > =A0 =A0procedure B is > > =A0 =A0begin > > =A0 =A0 =A0 < set of statements> > > =A0 =A0end B; > > end Test; > > > The question is this: when procedure A is called, are all threads that > > try to call B suspended until A finishes or, do the threads that call > > B execute as long as A is not touching the private data "Z". Is the > > lock at the procedure level or only at the data level? > > At the procedure level; see ARM 9.5.1 athttp://www.adaic.com/standards/05= rm/html/RM-9-5-1.html > > -- > Ludovic Brenta. Hi, In addition to the reference that Ludovic provided, here is a link that describes the Eggshell model that is used for protected objects: http://www.iuma.ulpgc.es/users/jmiranda/gnat-rts/node25.htm --Micronian Coder