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!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder02.blueworldhosting.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.netfront.net!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Ada advocacy Date: Fri, 30 Aug 2013 10:49:22 -0700 Organization: Netfront http://www.netfront.net/ Message-ID: References: <19595886.4450.1332248078686.JavaMail.geo-discussion-forums@vbbfy7> <2012032020582259520-rblove@airmailnet> <12ee9bc5-3bdf-4ac0-b805-5f10b3859ff4@googlegroups.com> <6c58fae4-6c34-4d7a-ab71-e857e55897c0@x6g2000vbj.googlegroups.com> NNTP-Posting-Host: 162.72.49.19 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: adenine.netfront.net 1377884966 70835 162.72.49.19 (30 Aug 2013 17:49:26 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Fri, 30 Aug 2013 17:49:26 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:17053 Date: 2013-08-30T10:49:22-07:00 List-Id: On 08/30/2013 09:54 AM, Robert A Duff wrote: > "Jeffrey R. Carter" writes: > >> That's not quite right. P can also be executing E1 or E2, in which case >> it is not "willing" to do either. T will end up at (***) in both of >> those cases as well. > > I don't think you mean "P can also be executing...", you mean "some task > can also be executing...". If we're going to use informal, active phrasing such as "P is willing" we can also say "P is executing" without fear of misunderstanding. > But anyway, no, unless I'm missing something, there are only two > possible states. If some task is executing the body of P.E1, then P > must be locked. So if another task comes along and tries to call one of > the entries, it will try to lock P, and will not proceed until the first > task leaves E1. At that point, the second task will check the barrier[*], > and find it in one of the two possible states.[**] That's even worse. Task T is delayed waiting for the other task to complete execution of P.E1, which can be a long time. Those of us who are not language lawyers (especially those who started with Ada 83) expect a conditional entry call to send the calling task to the else part immediately if the entry call cannot proceed. (Maybe that's not what the language rules say, but that's how it's usually presented.) Once T sees that P is locked, it should go to the else part. If the author of T were willing to be delayed waiting to get access to P, T would have used a timed entry call. -- Jeff Carter "Now go away or I shall taunt you a second time." Monty Python and the Holy Grail --- news://freenews.netfront.net/ - complaints: news@netfront.net ---