comp.lang.ada
 help / color / mirror / Atom feed
* Protected Entry Call Semantics
@ 2003-09-30 21:19 Stephan Heinemann
  2003-10-01  7:36 ` Dmitry A. Kazakov
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Stephan Heinemann @ 2003-09-30 21:19 UTC (permalink / raw)


Hi,

regarding entry calls on protected objects that cannot be immediately
selected, i.e., they are closed, the ARM states the following in C.9.5.3
(13,15):

--
When a queued call is selected, it is removed from its entry queue.
Selecting a queued call from a particular entry queue is called servicing
the entry queue. An entry with queued calls can be serviced under the
following circumstances:

[...]

If after performing, as part of a protected action on the associated
protected object, an operation on the object other than a call on a  
protected function, the entry is checked and found to be open.
--

Well, my problem is the "can be serviced" in C.9.5.3 (13). I am using
the Ravenscar profile and there may be only one task waiting on a
protected entry. Other tasks trigger that waiting task by opening the 
associated barrier. Lets say there is one such triggering task that
accesses the protected object twice during its response
(just for example, the same could be done with two tasks, each
triggering once). The first access opens the barrier while the second
one closes it.

Now, some implementations may choose to let the triggering task
execute the protected action of the waiting task and position the
latter after the entry call for its resumption. For other
implementations, the waiting task executes its protected action itself
and therefore it depends on the scheduler whether the waiting task 
may enter the protected object or not , i.e., if a time slice is given
to it or not. For the example given, this would be between the two
triggering tasks.

My problem is to formalise this situation somehow...
Do I need to take a particular implementation to be able to do so?
If yes, does anybody know how ORK/GNAT handles this situation?   
The problem is that even both accesses could open the barrier and
I do not even know which access really triggered the waiting task,
i.e., which values where passed to the waiting task and when.
But how can I tell whether a deadline is missed or not if I do not
even know to which event the response belonged?
Would it be a too hard constraint to allow only at most one
triggering task possessing only one triggering access to a
particular protected object in this case?

Thanks in advance,
Stephan




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-10-01 20:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-30 21:19 Protected Entry Call Semantics Stephan Heinemann
2003-10-01  7:36 ` Dmitry A. Kazakov
2003-10-01 19:22 ` JP Thornley
2003-10-01 20:07   ` Stephan Heinemann
2003-10-01 20:14   ` Martin Dowie
     [not found] ` <jmtp41-3k4.ln1@beastie.ix.netcom.com>
2003-10-01 20:18   ` Stephan Heinemann

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