File: AA-E-5.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 (297 lines) | stat: -rw-r--r-- 22,235 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
290
291
292
293
294
295
296
297
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
    <TITLE>AARM95 - Partition Communication Subsystem</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-E-4-2.html">Previous</A>&nbsp;&nbsp;&nbsp;<A HREF="AA-F.html">Next</A></P>
<HR>
<H1> E.5 Partition Communication Subsystem</H1>
<DIV Class="Paranum"><FONT SIZE=-2>1</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;<A NAME="I7041"></A><A NAME="I7042"></A>[The <I>Partition
Communication Subsystem</I> (PCS) provides facilities for supporting
communication between the active partitions of a distributed program.
The package System.RPC is a language-defined interface to the PCS.] An
implementation conforming to this Annex shall use the RPC interface to
implement remote subprogram calls. </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>1.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Reason: </B>The prefix RPC
is used rather than RSC because the term remote procedure call and its
acronym are more familiar. </FONT></DIV>

<H4 ALIGN=CENTER>Static Semantics</H4>
<DIV Class="Paranum"><FONT SIZE=-2>2</FONT></DIV>
<DIV Class="Normal" Style="margin-bottom: 0.4em">&nbsp;&nbsp;&nbsp;The following language-defined
library package exists: </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>3</FONT></DIV>
<DIV Class="Examples"><TT><B>with</B>&nbsp;Ada.Streams;&nbsp;<I>--&nbsp;see&nbsp;<A HREF="AA-13-13-1.html">13.13.1</A></I><BR>
<B>package</B>&nbsp;System.RPC&nbsp;<B>is</B><A NAME="I7043"></A><A NAME="I7044"></A><A NAME="I7045"></A></TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>4</FONT></DIV>
<DIV Class="Examples"><TT>&nbsp;&nbsp;&nbsp;<B>type</B>&nbsp;<A NAME="I7046"></A><A NAME="I7047"></A>Partition_ID&nbsp;<B>is&nbsp;range</B>&nbsp;0&nbsp;..&nbsp;<I>implementation-defined</I>;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>5</FONT></DIV>
<DIV Class="Examples"><TT>&nbsp;&nbsp;&nbsp;<A NAME="I7048"></A>Communication_Error&nbsp;:&nbsp;<B>exception</B>;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>6</FONT></DIV>
<DIV Class="Examples"><TT>&nbsp;&nbsp;&nbsp;<B>type</B>&nbsp;<A NAME="I7049"></A><A NAME="I7050"></A>Params_Stream_Type&nbsp;(<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initial_Size&nbsp;:&nbsp;Ada.Streams.Stream_Element_Count)&nbsp;<B>is</B>&nbsp;<B>new</B><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ada.Streams.Root_Stream_Type&nbsp;<B>with</B>&nbsp;<B>private</B>;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>7</FONT></DIV>
<DIV Class="Examples"><TT>&nbsp;&nbsp;&nbsp;<B>procedure</B>&nbsp;<A NAME="I7051"></A><A NAME="I7052"></A>Read(<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stream&nbsp;:&nbsp;<B>in&nbsp;out</B>&nbsp;Params_Stream_Type;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Item&nbsp;:&nbsp;<B>out</B>&nbsp;Ada.Streams.Stream_Element_Array;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Last&nbsp;:&nbsp;<B>out</B>&nbsp;Ada.Streams.Stream_Element_Offset);</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>8</FONT></DIV>
<DIV Class="Examples"><TT>&nbsp;&nbsp;&nbsp;<B>procedure</B>&nbsp;<A NAME="I7053"></A><A NAME="I7054"></A>Write(<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stream&nbsp;:&nbsp;<B>in&nbsp;out</B>&nbsp;Params_Stream_Type;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Item&nbsp;:&nbsp;<B>in</B>&nbsp;Ada.Streams.Stream_Element_Array);</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>9</FONT></DIV>
<DIV Class="Examples"><TT>&nbsp;&nbsp;&nbsp;<I>--&nbsp;Synchronous&nbsp;call</I><BR>
&nbsp;&nbsp;&nbsp;<B>procedure</B>&nbsp;<A NAME="I7055"></A><A NAME="I7056"></A>Do_RPC(<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Partition&nbsp;&nbsp;:&nbsp;<B>in</B>&nbsp;Partition_ID;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Params&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;<B>access</B>&nbsp;Params_Stream_Type;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Result&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;<B>access</B>&nbsp;Params_Stream_Type);</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>10</FONT></DIV>
<DIV Class="Examples"><TT>&nbsp;&nbsp;&nbsp;<I>--&nbsp;Asynchronous&nbsp;call</I><BR>
&nbsp;&nbsp;&nbsp;<B>procedure</B>&nbsp;<A NAME="I7057"></A><A NAME="I7058"></A>Do_APC(<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Partition&nbsp;&nbsp;:&nbsp;<B>in</B>&nbsp;Partition_ID;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Params&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;<B>access</B>&nbsp;Params_Stream_Type);</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>11</FONT></DIV>
<DIV Class="Examples"><TT>&nbsp;&nbsp;&nbsp;<I>--&nbsp;The&nbsp;handler&nbsp;for&nbsp;incoming&nbsp;RPCs</I><BR>
&nbsp;&nbsp;&nbsp;<B>type</B>&nbsp;<A NAME="I7059"></A><A NAME="I7060"></A>RPC_Receiver&nbsp;<B>is&nbsp;access&nbsp;procedure</B>(<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Params&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;<B>access</B>&nbsp;Params_Stream_Type;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Result&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;<B>access</B>&nbsp;Params_Stream_Type);</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>12</FONT></DIV>
<DIV Class="Examples"><TT>&nbsp;&nbsp;&nbsp;<B>procedure</B>&nbsp;<A NAME="I7061"></A><A NAME="I7062"></A>Establish_RPC_Receiver(<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Partition&nbsp;:&nbsp;<B>in</B>&nbsp;Partition_ID;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Receiver&nbsp;&nbsp;:&nbsp;<B>in</B>&nbsp;RPC_Receiver);</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>13</FONT></DIV>
<DIV Class="Examples"><TT><B>private</B><BR>
&nbsp;&nbsp;&nbsp;...&nbsp;--&nbsp;<I>not&nbsp;specified&nbsp;by&nbsp;the&nbsp;language</I><BR>
<B>end</B>&nbsp;System.RPC;</TT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>14</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;A value of the type Partition_ID is used to identify
a partition.</DIV>
<DIV Class="Paranum"><FONT SIZE=-2>15</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;An object of the type Params_Stream_Type is used
for identifying the particular remote subprogram that is being called,
as well as marshalling and unmarshalling the parameters or result of
a remote subprogram call, as part of sending them between partitions.</DIV>
<DIV Class="Paranum"><FONT SIZE=-2>16</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;[The Read and Write procedures override the corresponding
abstract operations for the type Params_Stream_Type.]</DIV>

<H4 ALIGN=CENTER>Dynamic Semantics</H4>
<DIV Class="Paranum"><FONT SIZE=-2>17</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;The Do_RPC and Do_APC procedures send a message
to the active partition identified by the Partition parameter. </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>17.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Implementation Note: </B>It
is assumed that the RPC interface is above the message-passing layer
of the network protocol stack and is implemented in terms of it. </FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>18</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;After sending the message, Do_RPC blocks the
calling task until a reply message comes back from the called partition
or some error is detected by the underlying communication system in which
case Communication_Error is raised at the point of the call to Do_RPC.
</DIV>
<DIV Class="Paranum"><FONT SIZE=-2>18.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Reason: </B>Only one exception
is defined in System.RPC, although many sources of errors might exist.
This is so because it is not always possible to distinguish among these
errors. In particular, it is often impossible to tell the difference
between a failing communication link and a failing processing node. Additional
information might be associated with a particular Exception_Occurrence
for a Communication_Error. </FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>19</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;Do_APC operates in the same way as Do_RPC except
that it is allowed to return immediately after sending the message.</DIV>
<DIV Class="Paranum"><FONT SIZE=-2>20</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;Upon normal return, the stream designated by
the Result parameter of Do_RPC contains the reply message.</DIV>
<DIV Class="Paranum"><FONT SIZE=-2>21</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;<A NAME="I7063"></A>The procedure System.RPC.Establish_RPC_Receiver
is called once, immediately after elaborating the library units of an
active partition (that is, right after the <I>elaboration of the partition</I>)
if the partition includes an RCI library unit, but prior to invoking
the main subprogram, if any. The Partition parameter is the Partition_ID
of the active partition being elaborated. <A NAME="I7064"></A>The Receiver
parameter designates an implementation-provided procedure called the
<I>RPC-receiver</I> which will handle all RPCs received by the partition
from the PCS. Establish_RPC_Receiver saves a reference to the RPC-receiver;
when a message is received at the called partition, the RPC-receiver
is called with the Params stream containing the message. When the RPC-receiver
returns, the contents of the stream designated by Result is placed in
a message and sent back to the calling partition. </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>21.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Implementation Note: </B>It
is defined by the PCS implementation whether one or more threads of control
should be available to process incoming messages and to wait for their
completion. </FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>21.b</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Implementation Note: </B>At
link-time, the linker provides the RPC-receiver and the necessary tables
to support it. A call on Establish_RPC_Receiver is inserted just before
the call on the main subprogram. </FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>21.c</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Reason: </B>The interface between
the PCS (the System.RPC package) and the RPC-receiver is defined to be
dynamic in order to allow the elaboration sequence to notify the PCS
that all packages have been elaborated and that it is safe to call the
receiving stubs. It is not guaranteed that the PCS units will be the
last to be elaborated, so some other indication that elaboration is complete
is needed. </FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>22</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;If a call on Do_RPC is aborted, a cancellation
message is sent to the called partition, to request that the execution
of the remotely called subprogram be aborted. </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>22.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>To be honest: </B>The full
effects of this message are dependent on the implementation of the PCS.
</FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>23</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;<A NAME="I7065"></A><A NAME="I7066"></A>The subprograms
declared in System.RPC are potentially blocking operations. </DIV>

<H4 ALIGN=CENTER>Implementation Requirements</H4>
<DIV Class="Paranum"><FONT SIZE=-2>24</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;The implementation of the RPC-receiver shall
be reentrant[, thereby allowing concurrent calls on it from the PCS to
service concurrent remote subprogram calls into the partition]. </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>24.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Reason: </B>There seems no
reason to allow the implementation of RPC-receiver to be nonreentrant,
even though we don't require that every implementation of the PCS actually
perform concurrent calls on the RPC-receiver. </FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>24.1/1</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<I><A HREF="defect1.html#8652/0087">8652/0087</A></I>}
<U>An implementation shall not restrict the replacement of the body of
System.RPC. An implementation shall not restrict children of System.RPC.
[The related implementation permissions in the introduction to Annex
A do not apply.]</U> </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>24.a.1/1</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Reason: </B><U>The point of
System.RPC is to let the user tailor the communications mechanism without
requiring changes to or other cooperation from the compiler. However,
implementations can restrict the replacement of language-defined units.
This requirement overrides that permission for System.RPC.</U> </FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>24.2/1</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<I><A HREF="defect1.html#8652/0087">8652/0087</A></I>}
<U>If the implementation of System.RPC is provided by the user, an implementation
shall support remote subprogram calls as specified.</U> </DIV>

<H4 ALIGN=CENTER>Documentation Requirements</H4>
<DIV Class="Paranum"><FONT SIZE=-2>25</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;The implementation of the PCS shall document
whether the RPC-receiver is invoked from concurrent tasks. If there is
an upper limit on the number of such tasks, this limit shall be documented
as well, together with the mechanisms to configure it (if this is supported).
</DIV>
<DIV Class="Paranum"><FONT SIZE=-2>25.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Implementation defined: </B>Implementation-defined
aspects of the PCS.</FONT></DIV>

<H4 ALIGN=CENTER>Implementation Permissions</H4>
<DIV Class="Paranum"><FONT SIZE=-2>26</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;The PCS is allowed to contain implementation-defined
interfaces for explicit message passing, broadcasting, etc. Similarly,
it is allowed to provide additional interfaces to query the state of
some remote partition (given its partition ID) or of the PCS itself,
to set timeouts and retry parameters, to get more detailed error status,
etc. These additional interfaces should be provided in child packages
of System.RPC. </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>26.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Implementation defined: </B>Implementation-defined
interfaces in the PCS.</FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>27</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;A body for the package System.RPC need not be
supplied by the implementation. </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>27.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Reason: </B>It is presumed
that a body for the package System.RPC might be extremely environment
specific. Therefore, we do not require that a body be provided by the
(compiler) implementation. The user will have to write a body, or acquire
one, appropriate for the target environment. </FONT></DIV>

<H4 ALIGN=CENTER>Implementation Advice</H4>
<DIV Class="Paranum"><FONT SIZE=-2>28</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;Whenever possible, the PCS on the called partition
should allow for multiple tasks to call the RPC-receiver with different
messages and should allow them to block until the corresponding subprogram
body returns.</DIV>
<DIV Class="Paranum"><FONT SIZE=-2>29</FONT></DIV>
<DIV Class="Normal">&nbsp;&nbsp;&nbsp;&nbsp;The Write operation on a stream of type Params_Stream_Type
should raise Storage_Error if it runs out of space trying to write the
Item into the stream. </DIV>
<DIV Class="Paranum"><FONT SIZE=-2>29.a</FONT></DIV>
<DIV Class="Annotations"><FONT SIZE=-1><B>Implementation Note: </B>An
implementation could also dynamically allocate more space as needed,
only propagating Storage_Error if the <FONT FACE="Arial, Helvetica">allocator</FONT>
it calls raises Storage_Error. This storage could be managed through
a controlled component of the stream object, to ensure that it is reclaimed
when the stream object is finalized. </FONT></DIV>
<DIV Class="NotesHeader"><FONT SIZE=-1>NOTES</FONT></DIV>
<DIV Class="Paranum"><FONT SIZE=-2>30</FONT></DIV>
<DIV Class="Notes"><FONT SIZE=-1>8&nbsp;&nbsp;The package System.RPC
is not designed for direct calls by user programs. It is instead designed
for use in the implementation of remote subprograms calls, being called
by the calling stubs generated for a remote call interface library unit
to initiate a remote call, and in turn calling back to an RPC-receiver
that dispatches to the receiving stubs generated for the body of a remote
call interface, to handle a remote call received from elsewhere. </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-E-4-2.html">Previous</A>&nbsp;&nbsp;&nbsp;<A HREF="AA-F.html">Next</A>&nbsp;&nbsp;&nbsp;<A HREF="AA-TTL.html">Legal</A></P>
</BODY>
</HTML>