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,fc232b1f37897ed0 X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: D.10 Date: 1999/04/13 Message-ID: #1/1 X-Deja-AN: 465882723 References: <7evc8l$pde$1@nnrp1.dejanews.com> NNTP-Posting-Date: Tue, 13 Apr 1999 06:49:07 PDT Newsgroups: comp.lang.ada Date: 1999-04-13T00:00:00+00:00 List-Id: Robert Dewar writes: > In article , > Matthew Heaney wrote: > > Paragraph D.10 (7) states that > > Much better to define your own. Can you give me specific advice about how to do that? What do you mean by "define your own"? > Possibly your implementation might do something specially efficient > with this package, it might also do something specially efficient with > simple cases of protected records. The rationale makes the argument that a suspension object is likely to be more efficient because it is "unnecessary to maintain a queue -- a major saving in run-time cost." (Rat95 D.10 p. D-37 para. 6) > Certainly GNAT just translates this into the corresponding > protected type in a naive way, and we have never seen a > program that used it except an ACVC test or two :-) I learned about suspension objects from the keynote speaker at last year's SIGAda conference, a person (I forget his name; works for Aonix UK) involved in the formulation of the Ravenscar profile. He said specifically that this was a feature for "close to the metal programming", a phrase he learnt from none other than Tucker Taft. You might think that a suspension object is "gratuitous nonsense," and of course you are entitled to your opinion. However, my expectation is that the suspension object is in the language because it admits a more efficient implementation than using a entry queue. For example, the programmer might be writing a program using an entry queue that he knows will only have a maximum of one caller. In this case, a queue is unnecessary. But let us waive aside any debates about whether a suspension object is a useful language feature, and concentrate on specifics. Is the program in section 12.3.1 of Burns and Wellings correct, or not?