home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / adav313.zip / gnat-3_13p-os2-bin-20010916.zip / emx / gnatlib / s-parint.ads < prev    next >
Text File  |  2000-07-19  |  6KB  |  146 lines

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