Ada Conformity Assessment Authority      Home Conformity Assessment   Test Suite ARGAda Standard
Annotated Ada Reference Manual (Ada 2022 Draft 34)Legal Information
Contents   Index   References   Search   Previous   Next 

9.7.3 Conditional Entry Calls

{AI95-00345-01} {AI12-0439-1} [A conditional_entry_call issues an entry call that is then cancelled if it is not selected immediately (or if a requeue-with-abort of the call is not selected immediately). A procedure call may appear rather than an entry call for cases where the procedure can might be implemented by an entry.] 
To be honest: In the case of an entry call on a protected object, it is OK if the entry is closed at the start of the corresponding protected action, so long as it opens and the call is selected before the end of that protected action (due to changes in the Count attribute). 


conditional_entry_call ::= 
  end select;

Dynamic Semantics

The execution of a conditional_entry_call is defined to be equivalent to the execution of a timed_entry_call with a delay_alternative specifying an immediate expiration time and the same sequence_of_statements as given after the reserved word else
NOTE   {AI12-0440-1} A conditional_entry_call can may briefly increase the Count attribute of the entry, even if the conditional call is not selected.


Example of a conditional entry call: 
{AI12-0178-1} procedure Spin(R : in out Resource) is  -- see 9.4
         null;  --  busy waiting
      end select;
   end loop;

Wording Changes from Ada 83

{AI05-0299-1} This subclause comes after the one for Timed Entry Calls, so we can define conditional entry calls in terms of timed entry calls. We do that so that an "expiration time" is defined for both, thereby simplifying the definition of what happens on a requeue-with-abort. 

Contents   Index   References   Search   Previous   Next 
Ada-Europe Ada 2005 and 2012 Editions sponsored in part by Ada-Europe