comp.lang.ada
 help / color / mirror / Atom feed
From: micronian2@gmail.com
Subject: Re: Quick Protected Object question
Date: Tue, 9 Dec 2008 11:59:54 -0800 (PST)
Date: 2008-12-09T11:59:54-08:00	[thread overview]
Message-ID: <c800881b-0e32-4787-b7ed-1e014e0c6b6c@c36g2000prc.googlegroups.com> (raw)
In-Reply-To: b16380cc-7f76-4827-bb4d-544863c5555e@w1g2000prk.googlegroups.com

On Dec 8, 5:43 am, Ludovic Brenta <ludo...@ludovic-brenta.org> wrote:
> On Dec 8, 2:34 pm, markp <markwor...@yahoo.com> wrote:
>
>
>
> > I have a very quick protected object question. In a standard proected
> > object setup as follows:
>
> > protected Test is
> >    procedure A;
> >    procedure B;
> > private
> >    Z : integer := 0;
> > end Test;
>
> > protected body Test is
> >    procedure A is
> >    begin
> >       < set of statements>
> >    end A;
>
> >    procedure B is
> >    begin
> >       < set of statements>
> >    end 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/05rm/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



      reply	other threads:[~2008-12-09 19:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08 13:34 Quick Protected Object question markp
2008-12-08 13:43 ` Ludovic Brenta
2008-12-09 19:59   ` micronian2 [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox