comp.lang.ada
 help / color / mirror / Atom feed
* more on safe-loop alternative
@ 1996-04-04  0:00 W. Wesley Groleau (Wes)
  1996-04-05  0:00 ` Robert Dewar
  0 siblings, 1 reply; 3+ messages in thread
From: W. Wesley Groleau (Wes) @ 1996-04-04  0:00 UTC (permalink / raw)


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
---------------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-04-05  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-04-04  0:00 more on safe-loop alternative W. Wesley Groleau (Wes)
1996-04-05  0:00 ` Robert Dewar
1996-04-05  0:00   ` Robert A Duff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox