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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7001494ace46eea7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-21 13:36:16 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news-feed1.de1.concert.net!fu-berlin.de!uni-berlin.de!b8935.pppool.DE!not-for-mail From: Dmitry A.Kazakov Newsgroups: comp.lang.ada Subject: Re: Overriding discriminants perplexes GNAT 3.14p Date: Sun, 22 Sep 2002 10:43:37 +0200 Message-ID: References: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: b8935.pppool.de (213.7.137.53) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1032640575 6563063 213.7.137.53 (16 [77047]) User-Agent: KNode/0.4 Xref: archiver1.google.com comp.lang.ada:29239 Date: 2002-09-22T10:43:37+02:00 List-Id: Adam Beneschan wrote: > Dmitry A.Kazakov wrote in message > news:... >> Adam Beneschan wrote: > >> > I think GNAT's behavior is legitimate here. Protected entry calls and >> > external requeues start new "protected actions" on the target >> > protected object (9.5.3(8), 9.5.4(11)). Thus, when >> > Objects.Object1.Point1 is called, a new protected action is started on >> > Object1. When this requeues to Object2.Point1, a new protected action >> > is started on Object2; however, the protected action on Object1 does >> > not complete (AI95-00148). >> >> Really? 9.5.4(10) says explicitly (for an internal requeue) that the >> ongoing action continues., but following it 9.5.4(11) keeps silence about >> that. From which I would assume that the ongoing action is replaced by a >> new one. If not, then a task may simultaneously perform an unlimited >> number of protected actions! I see no sense in that, and moreover, it >> would make external requeues almost useless. > > See http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00148.TXT?rev=1.2 > for the official word on the matter. Maybe I have missed something, it is a rather lenghty document, but it only clarifies a rather obvious idea that an external requeue should be made in a safe way to avoid race condition. So the original protected action lingers for awhile until requeueing is done. Does it say that the protected action continues and locks the original object until any consequent protected action and actions it in turn might invoke complete? It would a disaster. Consider a protected object serving as a scheduler. It routes requests via requeue to numerous other protected objects and tasks that would then serve the requests. It would be simply impossible to do that if the scheduler would remain locked until a request is finally served by another object or task. Again, IMO it would make the external requeue useless as a communication mechanism between protected objects. And there is no any other. -- Regards, Dmitry Kazakov www.dmitry-kazakov.de