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

9.9 Task and Entry Attributes

Dynamic Semantics

1
For a prefix T that is of a task type (after any implicit dereference), the following attributes are defined: 
2
T'Callable
Yields the value True when the task denoted by T is callable, and False otherwise; a task is callable unless it is completed or abnormal. The value of this attribute is of the predefined type Boolean.
3
T'Terminated
Yields the value True if the task denoted by T is terminated, and False otherwise. The value of this attribute is of the predefined type Boolean. 
4
For a prefix E that denotes an entry of a task or protected unit, the following attribute is defined. This attribute is only allowed within the body of the task or protected unit, but excluding, in the case of an entry of a task unit, within any program unit that is, itself, inner to the body of the task unit. 
5
E'Count
Yields the number of calls presently queued on the entry E of the current instance of the unit. The value of this attribute is of the type universal_integer.
6
NOTE 1   For the Count attribute, the entry can be either a single entry or an entry of a family. The name of the entry or entry family can be either a direct_name or an expanded name.
7/5
NOTE 2   Within task units, by interrogating the attribute E'Count an algorithm can allow for the increase of the value of this attribute for incoming entry calls, and its decrease, for example with timed_entry_calls. A conditional_entry_call can also briefly increase this value, even if the conditional call is not accepted.
8/5
NOTE 3   Within protected units, by interrogating the attribute E'Count in the entry_barrier for the entry E an algorithm can allow for the evaluation of the condition of the barrier both before and after queuing a given caller. 

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