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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: multiple delay alternative Date: Tue, 6 Mar 2018 17:36:41 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <90838aa0-bd51-4913-b0cf-1ded5024c151@googlegroups.com> <652df156-cec8-4417-ac0c-bed50c163a86@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 6 Mar 2018 16:36:41 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="4963e779f241cc41916b6a6c8e858e5b"; logging-data="20080"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+RIc40glXX6ETeyHA1s5tadFHtKSm5008=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-Reply-To: <652df156-cec8-4417-ac0c-bed50c163a86@googlegroups.com> Content-Language: en-US Cancel-Lock: sha1:DKHCcpp+cZAX61j99za1ZNnS4Y8= Xref: reader02.eternal-september.org comp.lang.ada:50851 Date: 2018-03-06T17:36:41+01:00 List-Id: On 03/06/2018 02:50 AM, Mehdi Saada wrote: > > Before that, one thing I can't get, even after asking other people: > for protected objects, in a protected procedure, when it's blocked, because a reading (protected function) or an entry is being served, are the calls to the procedure put on a queue as with entries ? > Someone said me the advantage of protected procedures was that you don't have to wait, but I read also they were exclusive with each others... damn. An entry call may block, because the barrier is False or the task is not executing an accept for it. A protected procedure call doesn't block, because it has no barrier, but it may have to wait to obtain exclusive access to the PO. Blocking and waiting are 2 different concepts. If you have multiple calls to protected procedures of a PO at the same time, I don't see anything that prevents that being implemented with a queue of callers. The important thing is that the calls are mutually exclusive and higher priority callers have precedence over lower priority ones. -- Jeff Carter "He that hath no beard is less than a man." Much Ado About Nothing 132