comp.lang.ada
 help / color / mirror / Atom feed
From: Dmitry A.Kazakov <mailbox@dmitry-kazakov.de>
Subject: Re: Overriding discriminants perplexes GNAT 3.14p
Date: Sun, 22 Sep 2002 10:43:37 +0200
Date: 2002-09-22T10:43:37+02:00	[thread overview]
Message-ID: <amil7u$6897n$1@ID-77047.news.dfncis.de> (raw)
In-Reply-To: b4682ab7.0209200800.6a4fdd11@posting.google.com

Adam Beneschan wrote:

> Dmitry A.Kazakov <mailbox@dmitry-kazakov.de> wrote in message
> news:<amerh4$5b11r$2@ID-77047.news.dfncis.de>...
>> 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



  reply	other threads:[~2002-09-22  8:43 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-19  2:32 Overriding discriminants perplexes GNAT 3.14p Dmitry A.Kazakov
2002-09-18 16:45 ` Stephen Leake
2002-09-19 21:34   ` Dmitry A.Kazakov
2002-09-19 15:51     ` Stephen Leake
2002-09-20 22:06       ` Dmitry A.Kazakov
2002-09-20 12:29         ` Stephen Leake
2002-09-22  8:43           ` Dmitry A.Kazakov
2002-09-22 13:32             ` Georg Bauhaus
2002-09-23  5:41               ` Dmitry A.Kazakov
2002-09-23 12:41                 ` Georg Bauhaus
2002-09-24  1:38                   ` Dmitry A.Kazakov
2002-09-23 15:33             ` Stephen Leake
2002-09-24  8:35               ` Dmitry A. Kazakov
2002-09-19 18:22     ` Adam Beneschan
2002-09-20 22:06       ` Dmitry A.Kazakov
2002-09-20 16:00         ` Adam Beneschan
2002-09-22  8:43           ` Dmitry A.Kazakov [this message]
2002-09-23 21:18             ` Adam Beneschan
2002-09-24  9:40               ` Dmitry A. Kazakov
2002-09-21 13:01     ` Simon Wright
2002-09-18 16:46 ` Mark Johnson
2002-09-19 21:34   ` Dmitry A.Kazakov
2002-09-19 16:17     ` Stephen Leake
2002-09-19 20:02       ` tmoran
2002-09-20 21:10       ` Dmitry A.Kazakov
2002-09-21 12:56       ` Simon Wright
2002-09-18 16:49 ` Frank J. Lhota
2002-09-19 21:34   ` Dmitry A.Kazakov
2002-09-18 17:17 ` Per Sandbergs
2002-09-19  8:51 ` Thierry Lelegard
  -- strict thread matches above, loose matches on Subject: below --
2002-09-19  9:08 Grein, Christoph
replies disabled

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