File: AA-9-1.html

package info (click to toggle)
ada-reference-manual 20021112web-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, sarge
  • size: 18,652 kB
  • ctags: 8,921
  • sloc: makefile: 52; sh: 20
file content (289 lines) | stat: -rw-r--r-- 22,202 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
    <TITLE>AARM95 - Task Units and Task Objects</TITLE>
    <META NAME="Author" CONTENT="JTC1/SC22/WG9/ARG, by Randall Brukardt, ARG Editor">
    <META NAME="GENERATOR" CONTENT="Arm_Form.Exe, Ada Reference Manual generator">
    <STYLE type="text/css">
    DIV.paranum {position: absolute; font-family: Arial, Helvetica, sans-serif; left: 0.5 em; top: auto}
    TT {font-family: "Courier New", monospace}
    DT {display: compact}
    DIV.Normal {font-family: "Times New Roman", Times, serif; margin-bottom: 0.6em}
    DIV.Wide {font-family: "Times New Roman", Times, serif; margin-top: 0.6em; margin-bottom: 0.6em}
    DIV.Annotations {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-bottom: 0.6em}
    DIV.WideAnnotations {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-top: 0.6em; margin-bottom: 0.6em}
    DIV.Index {font-family: "Times New Roman", Times, serif}
    DIV.SyntaxSummary {font-family: "Times New Roman", Times, serif; margin-left: 2.0em; margin-bottom: 0.4em}
    DIV.Notes {font-family: "Times New Roman", Times, serif; margin-left: 2.0em; margin-bottom: 0.6em}
    DIV.NotesHeader {font-family: "Times New Roman", Times, serif; margin-left: 2.0em}
    DIV.SyntaxIndented {font-family: "Times New Roman", Times, serif; margin-left: 2.0em; margin-bottom: 0.4em}
    DIV.Indented {font-family: "Times New Roman", Times, serif; margin-left: 6.0em; margin-bottom: 0.6em}
    DIV.CodeIndented {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-bottom: 0.6em}
    DIV.SmallIndented {font-family: "Times New Roman", Times, serif; margin-left:  10.0em; margin-bottom: 0.6em}
    DIV.SmallCodeIndented {font-family: "Times New Roman", Times, serif; margin-left: 8.0em; margin-bottom: 0.6em}
    DIV.Examples {font-family: "Courier New", monospace; margin-left: 2.0em; margin-bottom: 0.6em}
    DIV.SmallExamples {font-family: "Courier New", monospace; font-size: 80%; margin-left: 7.5em; margin-bottom: 0.6em}
    DIV.IndentedExamples {font-family: "Courier New", monospace; margin-left: 8.0em; margin-bottom: 0.6em}
    DIV.SmallIndentedExamples {font-family: "Courier New", monospace; font-size: 80%; margin-left:  15.0em; margin-bottom: 0.6em}
    UL.Bulleted {font-family: "Times New Roman", Times, serif; margin-left: 2.0em; margin-right: 2.0em; margin-top: 0em; margin-bottom: 0.5em}
    UL.SmallBulleted {font-family: "Times New Roman", Times, serif; margin-left: 6.0em; margin-right: 6.0em; margin-top: 0em; margin-bottom: 0.5em}
    UL.NestedBulleted {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-right: 4.0em; margin-top: 0em; margin-bottom: 0.5em}
    UL.SmallNestedBulleted {font-family: "Times New Roman", Times, serif; margin-left: 8.0em; margin-right: 8.0em; margin-top: 0em; margin-bottom: 0.5em}
    UL.IndentedBulleted {font-family: "Times New Roman", Times, serif; margin-left: 8.0em; margin-right: 8.0em; margin-top: 0em; margin-bottom: 0.5em}
    UL.CodeIndentedBulleted {font-family: "Times New Roman", Times, serif; margin-left: 6.0em; margin-right: 6.0em; margin-top: 0em; margin-bottom: 0.5em}
    UL.CodeIndentedNestedBulleted {font-family: "Times New Roman", Times, serif; margin-left: 8.0em; margin-right: 8.0em; margin-top: 0em; margin-bottom: 0.5em}
    UL.SyntaxIndentedBulleted {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-right: 4.0em; margin-top: 0em; margin-bottom: 0.5em}
    UL.NotesBulleted {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-right: 4.0em; margin-top: 0em; margin-bottom: 0.5em}
    UL.NotesNestedBulleted {font-family: "Times New Roman", Times, serif; margin-left: 6.0em; margin-right: 6.0em; margin-top: 0em; margin-bottom: 0.5em}
    DL.Hanging {font-family: "Times New Roman", Times, serif; margin-top: 0em; margin-bottom: 0.6em}
    DD.Hanging {margin-left: 6.0em}
    DL.IndentedHanging {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-top: 0em; margin-bottom: 0.6em}
    DD.IndentedHanging {margin-left: 2.0em}
    DL.HangingInBulleted {font-family: "Times New Roman", Times, serif; margin-left: 2.0em; margin-right: 2.0em; margin-top: 0em; margin-bottom: 0.5em}
    DD.HangingInBulleted {margin-left: 4.0em}
    DL.SmallHanging {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-top: 0em; margin-bottom: 0.6em}
    DD.SmallHanging {margin-left: 7.5em}
    DL.SmallIndentedHanging {font-family: "Times New Roman", Times, serif; margin-left: 8.0em; margin-top: 0em; margin-bottom: 0.6em}
    DD.SmallIndentedHanging {margin-left: 2.0em}
    DL.SmallHangingInBulleted {font-family: "Times New Roman", Times, serif; margin-left: 6.0em; margin-right: 6.0em; margin-top: 0em; margin-bottom: 0.5em}
    DD.SmallHangingInBulleted {margin-left: 5.0em}
    DL.Enumerated {font-family: "Times New Roman", Times, serif; margin-right: 0.0em; margin-top: 0em; margin-bottom: 0.5em}
    DD.Enumerated {margin-left: 2.0em}
    DL.SmallEnumerated {font-family: "Times New Roman", Times, serif; margin-left: 4.0em; margin-right: 4.0em; margin-top: 0em; margin-bottom: 0.5em}
    DD.SmallEnumerated {margin-left: 2.5em}
    DL.NestedEnumerated {font-family: "Times New Roman", Times, serif; margin-left: 2.0em; margin-right: 2.0em; margin-top: 0em; margin-bottom: 0.5em}
    DL.SmallNestedEnumerated {font-family: "Times New Roman", Times, serif; margin-left: 6.0em; margin-right: 6.0em; margin-top: 0em; margin-bottom: 0.5em}
    </STYLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFF0" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<P><A HREF="AA-TOC.html">Contents</A>&nbsp;&nbsp;&nbsp;<A HREF="AA-0-29.html">Index</A>&nbsp;&nbsp;&nbsp;<A HREF="AA-9.html">Previous</A>&nbsp;&nbsp;&nbsp;<A HREF="AA-9-2.html">Next</A></P>
<HR>
<H1> 9.1 Task Units and Task Objects</H1>
<DIV Class="Paranum"><FONT SIZE=-2>1</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;<A NAME="I3482"></A>A task unit is declared by
a <I>task declaration</I>, which has a corresponding <FONT FACE="Arial, Helvetica">task_body</FONT>.
A task declaration may be a <FONT FACE="Arial, Helvetica">task_type_declaration</FONT>,
in which case it declares a named task type; alternatively, it may be
a <FONT FACE="Arial, Helvetica">single_task_declaration</FONT>, in which
case it defines an anonymous task type, as well as declaring a named
task object of that type. </DIV>

<H4 ALIGN=CENTER>Syntax</H4>
<DIV Class="Paranum"><FONT SIZE=-2>2</FONT></DIV>
<DIV Class="SyntaxIndented"><FONT FACE="Arial, Helvetica">task_type_declaration<A NAME="I3483"></A>
::= </FONT><BR>
&nbsp;&nbsp;&nbsp;<B>task</B>&nbsp;<B>type</B>&nbsp;<A NAME="I3484"></A><FONT FACE="Arial, Helvetica">defining_identifier</FONT>&nbsp;[<A NAME="I3485"></A><FONT FACE="Arial, Helvetica">known_discriminant_part</FONT>]&nbsp;[<B>is</B>&nbsp;<A NAME="I3486"></A><FONT FACE="Arial, Helvetica">task_definition</FONT>];</DIV>
<DIV Class="Paranum"><FONT SIZE=-2>3</FONT></DIV>
<DIV Class="SyntaxIndented"><FONT FACE="Arial, Helvetica">single_task_declaration<A NAME="I3487"></A>
::= </FONT><BR>
&nbsp;&nbsp;&nbsp;<B>task</B>&nbsp;<A NAME="I3488"></A><FONT FACE="Arial, Helvetica">defining_identifier</FONT>&nbsp;[<B>is</B>&nbsp;<A NAME="I3489"></A><FONT FACE="Arial, Helvetica">task_definition</FONT>];</DIV>
<DIV Class="Paranum"><FONT SIZE=-2>4</FONT></DIV>
<DIV Class="SyntaxIndented"><FONT FACE="Arial, Helvetica">task_definition<A NAME="I3490"></A>
::= </FONT><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<A NAME="I3491"></A><FONT FACE="Arial, Helvetica">task_item</FONT>}<BR>
&nbsp;&nbsp;[&nbsp;<B>private</B><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<A NAME="I3492"></A><FONT FACE="Arial, Helvetica">task_item</FONT>}]<BR>
&nbsp;&nbsp;<B>end</B>&nbsp;[<I>task_</I><A NAME="I3493"></A><FONT FACE="Arial, Helvetica">identifier</FONT>]</DIV>
<DIV Class="Paranum"><FONT SIZE=-2>5/1</FONT></DIV>
<DIV Class="SyntaxIndented">{<I><A HREF="defect1.html#8652/0009">8652/0009</A></I>}
<FONT FACE="Arial, Helvetica">task_item<A NAME="I3494"></A> ::= </FONT><A NAME="I3495"></A><FONT FACE="Arial, Helvetica">entry_declaration</FONT>&nbsp;|&nbsp;<U><A NAME="I3496"></A><FONT FACE="Arial, Helvetica">aspect_clause</FONT></U><S><A NAME="I3497"></A><FONT FACE="Arial, Helvetica">representation_clause</FONT></S></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>6</FONT></DIV>
<DIV Class="SyntaxIndented"><FONT FACE="Arial, Helvetica">task_body<A NAME="I3498"></A>
::= </FONT><BR>
&nbsp;&nbsp;&nbsp;<B>task</B>&nbsp;<B>body</B>&nbsp;<A NAME="I3499"></A><FONT FACE="Arial, Helvetica">defining_identifier</FONT>&nbsp;<B>is</B><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A NAME="I3500"></A><FONT FACE="Arial, Helvetica">declarative_part</FONT><BR>
&nbsp;&nbsp;&nbsp;<B>begin</B><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A NAME="I3501"></A><FONT FACE="Arial, Helvetica">handled_sequence_of_statements</FONT><BR>
&nbsp;&nbsp;&nbsp;<B>end</B>&nbsp;[<I>task_</I><A NAME="I3502"></A><FONT FACE="Arial, Helvetica">identifier</FONT>];</DIV>
<DIV Class="Paranum"><FONT SIZE=-2>7</FONT></DIV>
<DIV Class="SyntaxIndented">If a <I>task_</I><FONT FACE="Arial, Helvetica">identifier</FONT>
appears at the end of a <FONT FACE="Arial, Helvetica">task_definition</FONT>
or <FONT FACE="Arial, Helvetica">task_body</FONT>, it shall repeat the
<FONT FACE="Arial, Helvetica">defining_identifier</FONT>. </DIV>

<H4 ALIGN=CENTER>Legality Rules</H4>
<DIV Class="Paranum"><FONT SIZE=-2>8</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;<A NAME="I3503"></A>A task declaration requires
a completion[, which shall be a <FONT FACE="Arial, Helvetica">task_body</FONT>,]
and every <FONT FACE="Arial, Helvetica">task_body</FONT> shall be the
completion of some task declaration. </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>8.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>To be honest: </B>The completion
can be a <FONT FACE="Arial, Helvetica">pragma</FONT> Import, if the implementation
supports it. </FONT></DIV>

<H4 ALIGN=CENTER>Static Semantics</H4>
<DIV Class="Paranum"><FONT SIZE=-2>9</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;A <FONT FACE="Arial, Helvetica">task_definition</FONT>
defines a task type and its first subtype. <A NAME="I3504"></A>The first
list of <FONT FACE="Arial, Helvetica">task_item</FONT>s of a <FONT FACE="Arial, Helvetica">task_definition</FONT>,
together with the <FONT FACE="Arial, Helvetica">known_discriminant_part</FONT>,
if any, is called the visible part of the task unit. [<A NAME="I3505"></A>
The optional list of <FONT FACE="Arial, Helvetica">task_item</FONT>s
after the reserved word <B>private</B> is called the private part of
the task unit.] </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>9.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Proof: </B>Private part is
defined in Section 8. </FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>9.1/1</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<I><A HREF="defect1.html#8652/0029">8652/0029</A></I>}
<U>For a task declaration without a <FONT FACE="Arial, Helvetica">task_definition</FONT>,
a <FONT FACE="Arial, Helvetica">task_definition</FONT> without <FONT FACE="Arial, Helvetica">task_items</FONT>
is assumed.</U> </DIV>

<H4 ALIGN=CENTER>Dynamic Semantics</H4>
<DIV Class="Paranum"><FONT SIZE=-2>10</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;[<A NAME="I3506"></A> The elaboration of a task
declaration elaborates the <FONT FACE="Arial, Helvetica">task_definition</FONT>.
<A NAME="I3507"></A>The elaboration of a <FONT FACE="Arial, Helvetica">single_task_declaration</FONT>
also creates an object of an (anonymous) task type.] </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>10.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Proof: </B>This is redundant
with the general rules for the elaboration of a <FONT FACE="Arial, Helvetica">full_type_declaration</FONT>
and an <FONT FACE="Arial, Helvetica">object_declaration</FONT>. </FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>11</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;<A NAME="I3508"></A>[The elaboration of a <FONT FACE="Arial, Helvetica">task_definition</FONT>
creates the task type and its first subtype;] it also includes the elaboration
of the <FONT FACE="Arial, Helvetica">entry_declaration</FONT>s in the
given order.</DIV>
<DIV Class="Paranum"><FONT SIZE=-2>12/1</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<I><A HREF="defect1.html#8652/0009">8652/0009</A></I>}
<A NAME="I3509"></A>As part of the initialization of a task object, any
<U><FONT FACE="Arial, Helvetica">aspect_clause</FONT>s</U><S><FONT FACE="Arial, Helvetica">representation_clause</FONT>s</S>
and any per-object constraints associated with <FONT FACE="Arial, Helvetica">entry_declaration</FONT>s
of the corresponding <FONT FACE="Arial, Helvetica">task_definition</FONT>
are elaborated in the given order. </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>12.a/1</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Reason: </B>The only <U><FONT FACE="Arial, Helvetica">aspect_clause</FONT>s</U><S><FONT FACE="Arial, Helvetica">representation_clause</FONT>s</S>
defined for task entries are ones that specify the Address of an entry,
as part of defining an interrupt entry. These clearly need to be elaborated
per-object, not per-type. Normally the address will be a function of
a discriminant, if such an Address clause is in a task type rather than
a single task declaration, though it could rely on a parameterless function
that allocates sequential interrupt vectors.</FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>12.b</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1>We do not mention representation
pragmas, since each pragma may have its own elaboration rules. </FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>13</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;<A NAME="I3510"></A>The elaboration of a <FONT FACE="Arial, Helvetica">task_body</FONT>
has no effect other than to establish that tasks of the type can from
then on be activated without failing the Elaboration_Check.</DIV>
<DIV Class="Paranum"><FONT SIZE=-2>14</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;[The execution of a <FONT FACE="Arial, Helvetica">task_body</FONT>
is invoked by the activation of a task of the corresponding type (see
<A HREF="AA-9-2.html">9.2</A>).]</DIV>
<DIV Class="Paranum"><FONT SIZE=-2>15</FONT></DIV>
<DIV Class="Normal" Style="margin-bottom: 0.4em">&nbsp;&nbsp;&nbsp;&nbsp;The content of
a task object of a given task type includes: </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>16</FONT></DIV>
<UL Class="Bulleted"><LI TYPE=DISC>The values of the discriminants of the task object, if
any;</LI></UL>
<DIV Class="Paranum"><FONT SIZE=-2>17</FONT></DIV>
<UL Class="Bulleted"><LI TYPE=DISC>An entry queue for each entry of the task object; </LI></UL>
<DIV Class="Paranum"><FONT SIZE=-2>17.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Ramification: </B>&quot;For
each entry&quot; implies one queue for each single entry, plus one for
each entry of each entry family. </FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>18</FONT></DIV>
<UL Class="Bulleted"><LI TYPE=DISC>A representation of the state of the associated task. </LI></UL>
<DIV Class="NotesHeader"><FONT SIZE=-1>NOTES</FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>19</FONT></DIV>
<DIV Class="Notes"><FONT SIZE=-1>2&nbsp;&nbsp;Within the declaration
or body of a task unit, the name of the task unit denotes the current
instance of the unit (see <A HREF="AA-8-6.html">8.6</A>), rather than
the first subtype of the corresponding task type (and thus the name cannot
be used as a <FONT FACE="Arial, Helvetica">subtype_mark</FONT>). </FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>19.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Discussion: </B>However, it
is possible to refer to some other subtype of the task type within its
body, presuming such a subtype has been declared between the <FONT FACE="Arial, Helvetica">task_type_declaration</FONT>
and the <FONT FACE="Arial, Helvetica">task_body</FONT>. </FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>20</FONT></DIV>
<DIV Class="Notes"><FONT SIZE=-1>3&nbsp;&nbsp;The notation of a <FONT FACE="Arial, Helvetica">selected_component</FONT>
can be used to denote a discriminant of a task (see <A HREF="AA-4-1-3.html">4.1.3</A>).
Within a task unit, the name of a discriminant of the task type denotes
the corresponding discriminant of the current instance of the unit.</FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>21</FONT></DIV>
<DIV Class="Notes"><FONT SIZE=-1>4&nbsp;&nbsp;A task type is a limited
type (see <A HREF="AA-7-5.html">7.5</A>), and hence has neither an assignment
operation nor predefined equality operators. If an application needs
to store and exchange task identities, it can do so by defining an access
type designating the corresponding task objects and by using access values
for identification purposes. Assignment is available for such an access
type as for any access type. Alternatively, if the implementation supports
the Systems Programming Annex, the Identity attribute can be used for
task identification (see <A HREF="AA-C-7.html">C.7</A>). </FONT></DIV>

<H4 ALIGN=CENTER>Examples</H4>
<DIV Class="Paranum"><FONT SIZE=-2>22</FONT></DIV>
<DIV Class="Normal" Style="margin-bottom: 0.4em">&nbsp;&nbsp;&nbsp;&nbsp;<I>Examples of
declarations of task types:</I> </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>23</FONT></DIV>
<DIV Class="Examples"><TT><B>task</B>&nbsp;<B>type</B>&nbsp;Server&nbsp;<B>is</B><BR>
&nbsp;&nbsp;&nbsp;<B>entry</B>&nbsp;Next_Work_Item(WI&nbsp;:&nbsp;<B>in</B>&nbsp;Work_Item);<BR>
&nbsp;&nbsp;&nbsp;<B>entry</B>&nbsp;Shut_Down;<BR>
<B>end</B>&nbsp;Server;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>24</FONT></DIV>
<DIV Class="Examples"><TT><B>task</B>&nbsp;<B>type</B>&nbsp;Keyboard_Driver(ID&nbsp;:&nbsp;Keyboard_ID&nbsp;:=&nbsp;New_ID)&nbsp;<B>is</B><BR>
&nbsp;&nbsp;&nbsp;<B>entry</B>&nbsp;Read&nbsp;(C&nbsp;:&nbsp;<B>out</B>&nbsp;Character);<BR>
&nbsp;&nbsp;&nbsp;<B>entry</B>&nbsp;Write(C&nbsp;:&nbsp;<B>in</B>&nbsp;&nbsp;Character);<BR>
<B>end</B>&nbsp;Keyboard_Driver;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>25</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;<I>Examples of declarations of single tasks:</I>
</DIV>
<DIV Class="Paranum"><FONT SIZE=-2>26</FONT></DIV>
<DIV Class="Examples"><TT><B>task</B>&nbsp;Controller&nbsp;<B>is</B><BR>
&nbsp;&nbsp;&nbsp;<B>entry</B>&nbsp;Request(Level)(D&nbsp;:&nbsp;Item);&nbsp;&nbsp;<I>--&nbsp;&nbsp;a&nbsp;family&nbsp;of&nbsp;entries</I><BR>
<B>end</B>&nbsp;Controller;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>27</FONT></DIV>
<DIV Class="Examples"><TT><B>task</B>&nbsp;Parser&nbsp;<B>is</B><BR>
&nbsp;&nbsp;&nbsp;<B>entry</B>&nbsp;Next_Lexeme(L&nbsp;:&nbsp;<B>in</B>&nbsp;&nbsp;Lexical_Element);<BR>
&nbsp;&nbsp;&nbsp;<B>entry</B>&nbsp;Next_Action(A&nbsp;:&nbsp;<B>out</B>&nbsp;Parser_Action);<BR>
<B>end</B>;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>28</FONT></DIV>
<DIV Class="Examples"><TT><B>task</B>&nbsp;User;&nbsp;&nbsp;<I>--&nbsp;&nbsp;has&nbsp;no&nbsp;entries</I></TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>29</FONT></DIV>
<DIV Class="Wide" Style="margin-bottom: 0.4em">&nbsp;&nbsp;&nbsp;&nbsp;<I>Examples of task
objects:</I> </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>30</FONT></DIV>
<DIV Class="Examples"><TT>Agent&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;Server;<BR>
Teletype&nbsp;:&nbsp;Keyboard_Driver(TTY_ID);<BR>
Pool&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;<B>array</B>(1&nbsp;..&nbsp;10)&nbsp;<B>of</B>&nbsp;Keyboard_Driver;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>31</FONT></DIV>
<DIV Class="Wide" Style="margin-bottom: 0.4em">&nbsp;&nbsp;&nbsp;&nbsp;<I>Example of access
type designating task objects:</I> </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>32</FONT></DIV>
<DIV Class="Examples"><TT><B>type</B>&nbsp;Keyboard&nbsp;<B>is</B>&nbsp;<B>access</B>&nbsp;Keyboard_Driver;<BR>
Terminal&nbsp;:&nbsp;Keyboard&nbsp;:=&nbsp;<B>new</B>&nbsp;Keyboard_Driver(Term_ID);</TT></DIV>

<H4 ALIGN=CENTER>Extensions to Ada 83</H4>
<DIV Class="Paranum"><FONT SIZE=-2>32.a/1</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><A NAME="I3511"></A>The syntax
rules for task declarations are modified to allow a <FONT FACE="Arial, Helvetica">known_discriminant_part</FONT>,
and to allow a private part. They are also modified to allow <FONT FACE="Arial, Helvetica">entry_declaration</FONT>s
and <U><FONT FACE="Arial, Helvetica">aspect_clause</FONT>s</U><S><FONT FACE="Arial, Helvetica">representation_clause</FONT>s</S>
to be mixed. </FONT></DIV>

<H4 ALIGN=CENTER>Wording Changes from Ada 83</H4>
<DIV Class="Paranum"><FONT SIZE=-2>32.b</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1>The syntax rules for tasks have
been split up according to task types and single tasks. In particular:
The syntax rules for <FONT FACE="Arial, Helvetica">task_declaration</FONT>
and <FONT FACE="Arial, Helvetica">task_specification</FONT> are removed.
The syntax rules for <FONT FACE="Arial, Helvetica">task_type_declaration</FONT>,
<FONT FACE="Arial, Helvetica">single_task_declaration</FONT>, <FONT FACE="Arial, Helvetica">task_definition</FONT>
and <FONT FACE="Arial, Helvetica">task_item</FONT> are new.</FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>32.c</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1>The syntax rule for <FONT FACE="Arial, Helvetica">task_body</FONT>
now uses the nonterminal <FONT FACE="Arial, Helvetica">handled_sequence_of_statements</FONT>.</FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>32.d</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1>The <FONT FACE="Arial, Helvetica">declarative_part</FONT>
of a <FONT FACE="Arial, Helvetica">task_body</FONT> is now required;
that doesn't make any real difference, because a <FONT FACE="Arial, Helvetica">declarative_part</FONT>
can be empty. </FONT></DIV>

<HR>
<P><A HREF="AA-TOC.html">Contents</A>&nbsp;&nbsp;&nbsp;<A HREF="AA-0-29.html">Index</A>&nbsp;&nbsp;&nbsp;<A HREF="AA-9.html">Previous</A>&nbsp;&nbsp;&nbsp;<A HREF="AA-9-2.html">Next</A>&nbsp;&nbsp;&nbsp;<A HREF="AA-TTL.html">Legal</A></P>
</BODY>
</HTML>