2003-05-31 Bud Davis <bdavis9659@comcast.net>
[official-gcc.git] / gcc / ada / s-parint.ads
blob34c873a55d85e24da3cbbdd47a647d05349d9bbf
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME COMPONENTS --
4 -- --
5 -- S Y S T E M . P A R T I T I O N _ I N T E R F A C E --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1995-2000 Free Software Foundation, Inc. --
10 -- --
11 -- GNARL is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 2, or (at your option) any later ver- --
14 -- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNARL; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
20 -- MA 02111-1307, USA. --
21 -- --
22 -- As a special exception, if other files instantiate generics from this --
23 -- unit, or you link this unit with other files to produce an executable, --
24 -- this unit does not by itself cause the resulting executable to be --
25 -- covered by the GNU General Public License. This exception does not --
26 -- however invalidate any other reasons why the executable file might be --
27 -- covered by the GNU Public License. --
28 -- --
29 -- GNAT was originally developed by the GNAT team at New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc. --
31 -- --
32 ------------------------------------------------------------------------------
34 with Ada.Exceptions;
35 with Interfaces;
36 with System.RPC;
38 package System.Partition_Interface is
40 pragma Elaborate_Body;
42 type Subprogram_Id is new Natural;
43 -- This type is used exclusively by stubs
45 subtype Unit_Name is String;
46 -- Name of Ada units
48 type Main_Subprogram_Type is access procedure;
50 type RACW_Stub_Type is tagged record
51 Origin : RPC.Partition_ID;
52 Receiver : Interfaces.Unsigned_64;
53 Addr : Interfaces.Unsigned_64;
54 Asynchronous : Boolean;
55 end record;
56 type RACW_Stub_Type_Access is access RACW_Stub_Type;
57 -- This type is used by the expansion to implement distributed objects.
58 -- Do not change its definition or its layout without updating
59 -- exp_dist.adb.
61 procedure Check
62 (Name : in Unit_Name;
63 Version : in String;
64 RCI : in Boolean := True);
65 -- Use by the main subprogram to check that a remote receiver
66 -- unit has has the same version than the caller's one.
68 function Get_Active_Partition_ID
69 (Name : Unit_Name)
70 return RPC.Partition_ID;
71 -- Similar in some respects to RCI_Info.Get_Active_Partition_ID
73 function Get_Active_Version
74 (Name : Unit_Name)
75 return String;
76 -- Similar in some respects to Get_Active_Partition_ID
78 function Get_Local_Partition_ID return RPC.Partition_ID;
79 -- Return the Partition_ID of the current partition
81 function Get_Passive_Partition_ID
82 (Name : Unit_Name)
83 return RPC.Partition_ID;
84 -- Return the Partition_ID of the given shared passive partition
86 function Get_Passive_Version (Name : Unit_Name) return String;
87 -- Return the version corresponding to a shared passive unit
89 function Get_RCI_Package_Receiver
90 (Name : Unit_Name)
91 return Interfaces.Unsigned_64;
92 -- Similar in some respects to RCI_Info.Get_RCI_Package_Receiver
94 procedure Get_Unique_Remote_Pointer
95 (Handler : in out RACW_Stub_Type_Access);
96 -- Get a unique pointer on a remote object
98 procedure Launch
99 (Rsh_Command : in String;
100 Name_Is_Host : in Boolean;
101 General_Name : in String;
102 Command_Line : in String);
103 -- General_Name represents the name of the machine or the name of the
104 -- partition (depending on the value of Name_Is_Host). Command_Line
105 -- holds the extra options that will be given on the command line.
106 -- Rsh_Command is typically "rsh", that will be used to launch the
107 -- other partition.
109 procedure Raise_Program_Error_For_E_4_18;
110 pragma No_Return (Raise_Program_Error_For_E_4_18);
111 -- Raise Program_Error with an error message explaining why it has been
112 -- raised. The rule in E.4 (18) is tricky and misleading for most users
113 -- of the distributed systems annex.
115 procedure Raise_Program_Error_Unknown_Tag
116 (E : in Ada.Exceptions.Exception_Occurrence);
117 pragma No_Return (Raise_Program_Error_Unknown_Tag);
118 -- Raise Program_Error with the same message as E one
120 procedure Register_Receiving_Stub
121 (Name : in Unit_Name;
122 Receiver : in RPC.RPC_Receiver;
123 Version : in String := "");
124 -- Register the fact that the Name receiving stub is now elaborated.
125 -- Register the access value to the package RPC_Receiver procedure.
127 procedure Register_Passive_Package
128 (Name : in Unit_Name;
129 Version : in String := "");
130 -- Register a passive package
132 generic
133 RCI_Name : String;
134 package RCI_Info is
135 function Get_RCI_Package_Receiver return Interfaces.Unsigned_64;
136 function Get_Active_Partition_ID return RPC.Partition_ID;
137 end RCI_Info;
138 -- RCI package information caching
140 procedure Run (Main : in Main_Subprogram_Type := null);
141 -- Run the main subprogram
143 end System.Partition_Interface;