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!news2.google.com!news1.google.com!news.glorb.com!news-out.readnews.com!transit3.readnews.com!newsfeed.yul.equant.net!newspeer.monmouth.com!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Protected Objects - eggshell model Date: Tue, 23 Dec 2008 19:49:07 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <63bd094e-8980-4b47-8e34-3d3d6f3b67d2@e1g2000pra.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1230079747 3219 192.74.137.71 (24 Dec 2008 00:49:07 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 24 Dec 2008 00:49:07 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:JClgKaHcPWNRBEjysrqJEGhY2m0= Xref: g2news1.google.com comp.lang.ada:3086 Date: 2008-12-23T19:49:07-05:00 List-Id: hesobreira writes: > 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? The barrier is likely looking at variables that are protected by the lock. So the lock must be obtained first. - Bob