Ada Reference ManualLegal 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. 

Syntax

2
The form of a pragma Remote_Call_Interface is as follows: 
3
  pragma Remote_Call_Interface[(library_unit_name)];
4
The form of a pragma All_Calls_Remote is as follows: 
5
  pragma All_Calls_Remote[(library_unit_name)];
6
A pragma All_Calls_Remote is a library unit pragma. 

Legality Rules

7/3
A pragma Remote_Call_Interface is used to specify that a library unit is a remote call interface (RCI), namely that the Remote_Call_Interface aspect of the library unit is True. 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;
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. 
16/3
A pragma All_Calls_Remote sets the All_Calls_Remote representation aspect of the library unit to which the pragma applies to the value True. 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/3
An implementation need not support the Remote_Call_Interface pragma or aspect nor the All_Calls_Remote pragma. 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