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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c8c049083de75c04,start X-Google-Attributes: gid103376,public From: "W. Wesley Groleau (Wes)" Subject: more on safe-loop alternative Date: 1996/04/04 Message-ID: <9604041927.AA07653@most>#1/1 X-Deja-AN: 145852014 sender: Ada programming language comments: Gated by NETNEWS@AUVM.AMERICAN.EDU mailer: Elm [revision: 70.85] newsgroups: comp.lang.ada Date: 1996-04-04T00:00:00+00:00 List-Id: An e-mail response to my safe loop musings said: :> My concern would be with the accuracy of any kind of delay. With :> Ada 83, it was a minimum delay, so for a real time system, that would :> not be very reliable. With Ada 95, you have the "delay until" :> which is somewhat better. However, many of the same concerns :> still apply. Also, the AQS 95 recommendation is to minimize the :> use of the asynchronous abort. (See 6.1.7, 6.2.5, and 6.3.3.) Actually, with Ada 95, it's still only a minimum. "delay until Deadline;" is semantically the same as "delay Deadline - Calendar.Clock;" (except for any inaccuracy of the clock call). However, the accuracy of the delay is not an issue in this case, for the same reason the AQS says (page 92), "The bounds of these checks do not have to be exact, just realistic." Let me consider your references: 6.1.7 -- "delay until" might be used if you need to ensure that the loop is abandoned before the deadline to do something else. If you just want to ensure that the loop isn't a "runaway" the "old" delay is better. 6.2.5 -- Although these guidelines are not directed at the "asynchronous transfer," the advice the give IS applicable. However, in this case we again do not need precision. 6.3.3 -- The objection in the first rationale para. is valid. Presumably the statements after the delay would ensure things are restored to a valid state. The second paragraph is also valid, but again, accuracy is not essential. (Of course, if it never stops....) (Some of the second paragraph's objections will not apply if no other tasks but the one containing the loop are affected.) -- --------------------------------------------------------------------------- W. Wesley Groleau (Wes) Office: 219-429-4923 Magnavox--a Hughes Defense Communications Company. Home: 219-471-7206 Fort Wayne, IN 46808 elm (Unix): wwgrol@pseserv3.fw.hac.com ---------------------------------------------------------------------------