Denotes a value of the type universal_integer that identifies the partition in which D was elaborated. If D denotes the declaration of a remote call interface library unit, see section Remote Call Interface Library Units, the given partition is the one where the body of D was elaborated.Bounded (Run-Time) Errors
Can depend only on other declared pure library units;
Can depend only on other shared passive or declared pure library units;
The declaration of the library unit can depend only on other remote types library units, or one of the above; the body of the library unit is unrestricted;
The declaration of the library unit can depend only on other remote call interfaces, or one of the above; the body of the library unit is unrestricted;
Unrestricted.
pragma Shared_Passive[(library_unit_name)];Legality Rules
pragma Remote_Types[(library_unit_name)];Legality Rules
pragma Remote_Call_Interface[(library_unit_name)];
pragma All_Calls_Remote[(library_unit_name)];
Legality Rules
Yields a value of the predefined type String that identifies the version of the compilation unit that contains the declaration of the program unit.
Yields a value of the predefined type String that identifies the version of the compilation unit that contains the body (but not any subunits) of the program unit.
pragma Asynchronous(local_name);Legality Rules
Static Semantics
Examples
package Tapes is
pragma Pure(Tapes);
type Tape is abstract tagged limited private;
-- Primitive dispatching operations where
-- Tape is controlling operand
procedure Copy (From, To : access Tape;
Num_Recs : in Natural) is abstract;
procedure Rewind (T : access Tape) is abstract;
-- More operations
private
type Tape is ...
end Tapes;
with Tapes; package Name_Server is pragma Remote_Call_Interface; -- Dynamic binding to remote operations is achieved -- using the access-to-limited-class-wide type Tape_Ptr type Tape_Ptr is access all Tapes.Tape'Class; -- The following statically bound remote operations -- allow for a name-server capability in this example function Find (Name : String) return Tape_Ptr; procedure Register (Name : in String; T : in Tape_Ptr); procedure Remove (T : in Tape_Ptr); -- More operations end Name_Server;
package Tape_Driver is -- Declarations are not shown, they are irrelevant here end Tape_Driver;
with Tapes, Name_Server;
package body Tape_Driver is
type New_Tape is new Tapes.Tape with ...
procedure Copy
(From, To : access New_Tape; Num_Recs: in Natural) is
begin
. . .
end Copy;
procedure Rewind (T : access New_Tape) is
begin
. . .
end Rewind;
-- Objects remotely accessible through use
-- of Name_Server operations
Tape1, Tape2 : aliased New_Tape;
begin
Name_Server.Register ("NINE-TRACK", Tape1'Access);
Name_Server.Register ("SEVEN-TRACK", Tape2'Access);
end Tape_Driver;
with Tapes, Name_Server;
-- Tape_Driver is not needed
-- and thus not mentioned in the with_clause
procedure Tape_Client is
T1, T2 : Name_Server.Tape_Ptr;
begin
T1 := Name_Server.Find ("NINE-TRACK");
T2 := Name_Server.Find ("SEVEN-TRACK");
Tapes.Rewind (T1);
Tapes.Rewind (T2);
Tapes.Copy (T1, T2, 3);
end Tape_Client;
with Ada.Streams; -- see section The Package Streams. package System.RPC is
type Partition_ID is range 0 .. implementation-defined;
Communication_Error : exception;
type Params_Stream_Type(
Initial_Size : Ada.Streams.Stream_Element_Count) is new
Ada.Streams.Root_Stream_Type with private;
procedure Read(
Stream : in out Params_Stream_Type;
Item : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset);
procedure Write(
Stream : in out Params_Stream_Type;
Item : in Ada.Streams.Stream_Element_Array);
-- Synchronous call
procedure Do_RPC(
Partition : in Partition_ID;
Params : access Params_Stream_Type;
Result : access Params_Stream_Type);
-- Asynchronous call
procedure Do_APC(
Partition : in Partition_ID;
Params : access Params_Stream_Type);
-- The handler for incoming RPCs
type RPC_Receiver is access procedure(
Params : access Params_Stream_Type;
Result : access Params_Stream_Type);
procedure Establish_RPC_Receiver(
Partition : in Partition_ID;
Receiver : in RPC_Receiver);
private ... -- not specified by the language end System.RPC;
Go to the first, previous, next, last section, table of contents.