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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2238718bc6b1a6f1 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!z28g2000prd.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Protected Objects - eggshell model Date: Tue, 23 Dec 2008 16:43:32 -0800 (PST) Organization: http://groups.google.com Message-ID: <734a696c-f69f-4dc4-8c66-d01a3a468a19@z28g2000prd.googlegroups.com> References: <63bd094e-8980-4b47-8e34-3d3d6f3b67d2@e1g2000pra.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1230079412 1564 127.0.0.1 (24 Dec 2008 00:43:32 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 24 Dec 2008 00:43:32 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z28g2000prd.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:3085 Date: 2008-12-23T16:43:32-08:00 List-Id: On Dec 23, 2:08 pm, hesobreira 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