* Quick Protected Object question
@ 2008-12-08 13:34 markp
2008-12-08 13:43 ` Ludovic Brenta
0 siblings, 1 reply; 3+ messages in thread
From: markp @ 2008-12-08 13:34 UTC (permalink / raw)
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?
Thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Quick Protected Object question
2008-12-08 13:34 Quick Protected Object question markp
@ 2008-12-08 13:43 ` Ludovic Brenta
2008-12-09 19:59 ` micronian2
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Brenta @ 2008-12-08 13:43 UTC (permalink / raw)
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 at http://www.adaic.com/standards/05rm/html/RM-9-5-1.html
--
Ludovic Brenta.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Quick Protected Object question
2008-12-08 13:43 ` Ludovic Brenta
@ 2008-12-09 19:59 ` micronian2
0 siblings, 0 replies; 3+ messages in thread
From: micronian2 @ 2008-12-09 19:59 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-09 19:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-08 13:34 Quick Protected Object question markp
2008-12-08 13:43 ` Ludovic Brenta
2008-12-09 19:59 ` micronian2
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox