Ada Reference Manual (Ada 2022)Legal Information
Contents   Index   References   Search   Previous   Next 

E.2.3 Remote Call Interface Library Units

1
A remote call interface library unit can be used as an interface for remote procedure calls (RPCs) (or remote function calls) between active partitions. 
Paragraphs 2 through 6 were moved to Annex J, “Obsolescent Features”. 

Legality Rules

7/5
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.
8/3
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.
9/1
In addition, the following restrictions apply to an RCI library unit: 
10/1
its visible part shall not contain the declaration of a variable; 
11/1
its visible part shall not contain the declaration of a limited type; 
12/1
its visible part shall not contain a nested generic_declaration;
13/3
it shall not be, nor shall its visible part contain, the declaration of a subprogram for which aspect Inline is True;
13.1/5
it shall not be, nor shall its visible part contain, the declaration of a subprogram that is nonblocking (see 9.5);
14/3
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);
15
any public child of the library unit shall be a remote call interface library unit. 
15.1/5
  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.
16/5
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

17
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. 
18
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

19/4
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
19.1/4
A direct call to a subprogram of the RCI unit from outside the declarative region of the unit;
19.2/4
An indirect call through a remote access-to-subprogram value that designates a subprogram of the RCI unit;
19.3/4
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

20/5
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.

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