comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Protected Objects - eggshell model
Date: Tue, 23 Dec 2008 16:43:32 -0800 (PST)
Date: 2008-12-23T16:43:32-08:00	[thread overview]
Message-ID: <734a696c-f69f-4dc4-8c66-d01a3a468a19@z28g2000prd.googlegroups.com> (raw)
In-Reply-To: 63bd094e-8980-4b47-8e34-3d3d6f3b67d2@e1g2000pra.googlegroups.com

On Dec 23, 2:08 pm, hesobreira <herrsobre...@gmail.com> wrote:
> This was not clear to me while reading Barnes' book about protected
> types.
>
> There are two conditions that must be satisfied in order to execute
> the entry call: no other task accessing the object at the same time
> and the condition barrier evaluated to TRUE (eggshell, or two level
> protection model). My question is: which one of these conditions is
> evaluated first, the access lock or the condition barrier?
>
> Thank you all in advance,
> Hugo

The access lock has to be obtained first, and in fact the task calling
the protected entry has to have the protected object all to itself
while it's evaluating the entry barrier.  If the barrier is closed
(False), the entry call is added to a queue, and *then* the lock is
relinquished.

In the RM, the concept of access locking is expressed by the phrase
"protected actions".  See 9.5.1(4-7) and 9.5.3(8-12).

                            -- Adam



  reply	other threads:[~2008-12-24  0:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-23 22:08 Protected Objects - eggshell model hesobreira
2008-12-24  0:43 ` Adam Beneschan [this message]
2008-12-25 14:29   ` hesobreira
2008-12-24  0:49 ` Robert A Duff
replies disabled

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