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