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;
{task
state (callable) [partial]} {callable}
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
44 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
45 Within task units, algorithms interrogating
the attribute E'Count should take precautions to allow for the increase
of the value of this attribute for incoming entry calls, and its decrease,
for example with timed_entry_calls. Also,
a conditional_entry_call may briefly increase
this value, even if the conditional call is not accepted.
8
46 Within protected units, algorithms interrogating
the attribute E'Count in the entry_barrier
for the entry E should take precautions to allow for the evaluation of
the condition of the barrier both before and
after queuing a given caller.