E.2.3 Remote Call Interface Library Units
A remote call interface library unit can be used
as an interface for remote procedure calls (RPCs) (or remote function
calls) between active partitions.
Legality Rules
When
the library unit aspect (see
13.1.1) Remote_Call_Interface
of a library unit is True, the library unit is a
remote call interface
(RCI). A subprogram declared in the visible part of such a library
unit, or declared by such a library unit, is called a
remote subprogram.
The declaration of an RCI library unit shall be preelaborable
(see
10.2.1), and shall depend semantically
only upon declared pure
library_items,
shared passive library units, remote types library units, other remote
call interface library units, or preelaborated normal library units that
are mentioned only in private with clauses.
In addition, the following
restrictions apply to an RCI library unit:
its visible part shall not contain the declaration
of a variable;
its visible part shall not contain the declaration
of a limited type;
it shall not be, nor shall its visible part contain,
the declaration of a subprogram for which aspect Inline is True;
it shall not be, nor shall its visible part contain,
the declaration of a subprogram that is nonblocking (see
9.5);
it shall not be, nor shall its visible part contain,
a subprogram (or access-to-subprogram) declaration whose profile has
a parameter or result of a type that does not support external streaming
(see
13.13.2);
any public child of the library unit shall be a
remote call interface library unit.
Specification of a stream-oriented attribute is
illegal in the specification of a remote call interface library unit.
In addition to the places where Legality Rules normally apply (see
12.3),
this rule applies also in the private part of an instance of a generic
unit.
All_Calls_Remote is a library unit aspect
.
If the All_Calls_Remote aspect of a library unit is True, the library
unit shall be a remote call interface.
Post-Compilation Rules
A remote call interface library unit shall be assigned
to at most one partition of a given program. A remote call interface
library unit whose parent is also an RCI library unit shall be assigned
only to the same partition as its parent.
Notwithstanding
the rule given in
10.2, a compilation unit
in a given partition that semantically depends on the declaration of
an RCI library unit,
needs (in the sense of
10.2)
only the declaration of the RCI library unit, not the body, to be included
in that same partition. Therefore, the body of an RCI library unit is
included only in the partition to which the RCI library unit is explicitly
assigned.
Implementation Requirements
If aspect All_Calls_Remote
is True for a given RCI library unit, then the implementation shall route
any of the following calls through the Partition Communication Subsystem
(PCS); see
E.5:
A direct call to a subprogram of the RCI unit from
outside the declarative region of the unit;
An indirect call through a remote access-to-subprogram
value that designates a subprogram of the RCI unit;
A dispatching call with a controlling operand designated
by a remote access-to-class-wide value whose tag identifies a type declared
in the RCI unit.
Implementation Permissions
An implementation may omit support for the Remote_Call_Interface
aspect or the All_Calls_Remote aspect. Explicit message-based communication
between active partitions can be supported as an alternative to RPC.
Ada 2005 and 2012 Editions sponsored in part by Ada-Europe