TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Keith Shillington <[log in to unmask]>
Reply To:
Keith Shillington <[log in to unmask]>
Date:
Wed, 5 Nov 1997 08:12:18 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
Out of the haze, and into focus:

  Ada83 DOES NOT REQUIRE rescheduling.  Ada95 core doesn't either.
  Ada95 Annex D (just like Tuck sez) DOES.

At 09:38 AM 11/5/97 -0600, Samuel Mize wrote:
>HAZY RECOLLECTION:
>I believe it was not required in Ada 83 that a "delay 0.0" provide a
>task rescheduling opportunity.  My guess is that they didn't realize
>it would be an issue.
Excellent guess.  And "they" would be "he".

>> A "delay 0.0" should be a potential break, what else?
>> Give me one reason not to do so.

One reason:

  delay timeslot-timeused;

This programmer would prefer that zero and negative values be optimized out
so that this critical task can hog the processor until it catches up.  I'm
not condoning this coding behavior, just pointing to it as a valid example.

>(A REALLY savvy compiler writer might reschedule on an explicit "delay
>0.0", but not on a computed "delay [expression]" where [expression]
>evaluates to 0.0.  I don't know if anyone did this.  If so, it was
>implementation-dependent, and you couldn't count on it.)

Hence the idiom:

  delay Duration'Small;


Keith Shillington - [log in to unmask]
Manager, Ada Customer Support

ATOM RSS1 RSS2