comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: requeue vs requeue with abort - code example pleaseeee
Date: Fri, 10 Dec 2010 12:27:34 -0500
Date: 2010-12-10T12:27:34-05:00	[thread overview]
Message-ID: <wcc39q5zgft.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 4b300308-549a-41db-a0e3-961bf9e4f422@l8g2000yqh.googlegroups.com

AdaMagica <christoph.grein@eurocopter.com> writes:

> There is a also a subtle difference between a conditional entry call
> and a timed entry call with zero delay (even though 9.7.3(3) says that
> they are equivalent).

That can't be right.  9.7.3(3) defines the semantics of conditional
entry call.  How can the RM be wrong about what the RM says?  ;-)

> ...If the communication time between caller and callee is significant,
> the timed entry call is cancelled at once, even though the callee may
> be ready to accept.

No, for a timed entry call, the call is first "issued", which involves
first checking whether the called task or protected object is ready.
This might take a long time (in your Voyager example).  It will
certainly take more than 0.0 seconds, but that doesn't matter -- if the
callee is ready, then the entry call proceeds.  It doesn't matter that
it takes a finite amount of time to determine whether the callee is
ready.

Only after finding the callee NOT ready do we think about cancelling
the call.

>...The conditional entry call will succeed because it will not be
>cancelled before the request reaches the callee and the open
>alternatives are examined (a conditional entry call to a task running
>on Voyager will succeed, a timed one will be cancelled).

Right.

So a conditional call behaves the same as a timed call with "delay 0.0".
It doesn't matter whether requeue is involved.

Note that it doesn't matter whether the callee is ready at the time
the conditional or timed call starts -- that is unknown, and unknowable.

I snipped your example, because it doesn't have any conditional
entry calls, nor "delay 0.0" calls, so it's not related to
this equivalence.

- Bob



  reply	other threads:[~2010-12-10 17:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09 13:57 requeue vs requeue with abort - code example pleaseeee domel
2010-12-09 16:22 ` Dmitry A. Kazakov
2010-12-09 19:00 ` Warren
2010-12-10  0:11   ` Randy Brukardt
2010-12-10  5:52     ` Shark8
2010-12-10  7:14   ` Simon Wright
2010-12-10  8:34   ` Dmitry A. Kazakov
2010-12-10 10:12     ` AdaMagica
2010-12-10 17:27       ` Robert A Duff [this message]
2010-12-11 15:59         ` AdaMagica
2010-12-10 16:11     ` Adam Beneschan
2010-12-10 20:13     ` Warren
2010-12-10 21:30       ` Adam Beneschan
2010-12-10 21:48         ` Simon Wright
2010-12-13 16:21         ` Warren
2010-12-13 19:55           ` Adam Beneschan
2010-12-14 15:40             ` Warren
2010-12-11  0:46       ` Peter C. Chapin
2010-12-11  1:39         ` Adam Beneschan
replies disabled

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