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-Language: ENGLISH,ASCII X-Google-Thread: 103376,25ecb78615e0f778 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-23 09:19:49 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!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 and external call Date: 23 Jan 2004 12:19:49 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <5f59677c.0401220851.3c2922b0@posting.google.com> <72oqub.mka.ln@skymaster> <2tfrub.25v.ln@skymaster> NNTP-Posting-Host: pip1-5.std.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: pcls4.std.com 1074878389 28083 192.74.137.185 (23 Jan 2004 17:19:49 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 23 Jan 2004 17:19:49 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:4724 Date: 2004-01-23T12:19:49-05:00 List-Id: "Jean-Pierre Rosen" writes: > "Robert A Duff" a �crit dans le message de > > > This is why it is considered a potentially blocking operation, and as > > > such disallowed in a protected operation. > > > > No, I don't think that's quite right. Entry calls are potentially > > blocking, and you're not supposed to call them from inside a protected > > procedure. (Actually, it's a bounded error, and some compilers allow > > it.) But a protected procedure can call another protected procedure > > with an external call. It's up to the programmer to make sure it's not > > the same protected object. (You also have to obey the priority > > ceiling rules.) > > > > In other words, merely grabbing the lock of a PO is *not* considered > > blocking or potentially blocking in Ada, and no queue-ing need be > > involved. > > > 9.5.1(16): [Potentially blocking operations] > an external call on a protected subprogram (or an external requeue) > with the same target object as that of the protected action; Ah, thanks, I had forgotten that. Note that this is *only* talking about the deadlocking case -- it's just fine to call some other PO's procedures, and you can't detect this at compile time. The AARM explains, "This is really a deadlocking call, not a blocking call...." - Bob