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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,c33f8f65997c21d0 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Received: by 10.180.107.38 with SMTP id gz6mr500330wib.0.1348936400327; Sat, 29 Sep 2012 09:33:20 -0700 (PDT) Path: q11ni98592563wiw.1!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newspeer1.nac.net!news.mi.ras.ru!goblin-spool!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Problem with task component Date: Mon, 24 Sep 2012 15:37:41 +0200 Organization: A noiseless patient Spider Message-ID: References: <1667b8e2qt7ei$.1gg1h3hrp9amz$.dlg@40tude.net> <187uk10m6z8xj.yr1cpbgrdur$.dlg@40tude.net> Mime-Version: 1.0 Injection-Date: Mon, 24 Sep 2012 13:37:35 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="da91dd38436bbbf5b448e21e8f29aa94"; logging-data="24868"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19qR+8gazotp8qIwiFt6WB1" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 In-Reply-To: Cancel-Lock: sha1:I5kj6z0e/WlQOwE0HXw+qb/yUkw= X-Enigmail-Version: 1.4.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2012-09-24T15:37:41+02:00 List-Id: Le 24/09/2012 10:23, Simon Wright a écrit : > The language in ARM9.3 is, now you point it out, quite opaque, > especially if you approach it with wrong assumptions. [good explanation snipped] The principle of the "terminate" is that a task terminates automatically if it can be proven that its entries cannot be called. Since a task is not visible outside its master*, any task that can call T must depend on the same master as T. Therefore, T can terminate if its master is completed, and every task depending on the master is either completed or waiting on a terminate alternative. However, imagine that the master (M) itself is waiting on a terminate alternative. If M is revived, it could in turn call T. Therefore, the previous reasoning must be extended to M's master, and so on. I hope this makes the wording more understandable: "the open terminate_alternative is selected if and only if the following conditions are satisfied: - The task depends on some completed master; and - Each task that depends on the master considered is either already terminated or similarly blocked at a select_statement with an open terminate_alternative. When both conditions are satisfied, the task considered becomes completed, together with all tasks that depend on the master considered that are not yet completed." Now, if one of the tasks in the whole family is allowed to wake-up due to expiration of a delay statement, it could call T (directly or indirectly), and wake up the whole gang. Therefore, terminate could never be selected for the task that has the delay - implying that terminate could not be selected for any other task in the family. ------ * except for the infamous "rosen pathology" in Ada 83 that was exterminated in Ada 95 -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr