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 / a-interr.ads < prev    next >
Text File  |  2000-07-19  |  3KB  |  69 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                        GNAT RUN-TIME COMPONENTS                          --
  4. --                                                                          --
  5. --                       A D A . I N T E R R U P T S                        --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.13 $                             --
  10. --                                                                          --
  11. -- This specification is adapted from the Ada Reference Manual for use with --
  12. -- GNAT.  In accordance with the copyright of that document, you can freely --
  13. -- copy and modify this specification,  provided that if you redistribute a --
  14. -- modified version,  any changes that you have made are clearly indicated. --
  15. --                                                                          --
  16. ------------------------------------------------------------------------------
  17.  
  18. with System.Interrupts;
  19. --  used for Ada_Interrupt_ID
  20.  
  21. package Ada.Interrupts is
  22.  
  23.    --  Made definition of Interrupt_ID depend on System.OS_Interface.
  24.    --  rather than being a visible target-specific type.
  25.    --  This made the file a-interr.ads target-independent.
  26.    --  The target-specific declaration of Interrupt_ID is *not* in
  27.    --  System.Interrupts, because that contains operations on Interrupt_IDs
  28.    --  that we do not want to inherit and make visible here.
  29.    --  It is in System.OS_Interface because operations on this type
  30.    --  will need visibility of other target-specific info. that is only
  31.    --  visible there.
  32.    --  Made non-renamed subprograms in line, for efficiency.
  33.  
  34.    type Interrupt_ID is new System.Interrupts.Ada_Interrupt_ID;
  35.  
  36.    type Parameterless_Handler is access protected procedure;
  37.  
  38.    function Is_Reserved (Interrupt : Interrupt_ID)
  39.       return Boolean;
  40.    pragma Inline (Is_Reserved);
  41.  
  42.    function Is_Attached (Interrupt : Interrupt_ID)
  43.       return Boolean;
  44.    pragma Inline (Is_Attached);
  45.  
  46.    function Current_Handler (Interrupt : Interrupt_ID)
  47.       return Parameterless_Handler;
  48.    pragma Inline (Current_Handler);
  49.  
  50.    procedure Attach_Handler
  51.       (New_Handler : Parameterless_Handler;
  52.        Interrupt   : Interrupt_ID);
  53.    pragma Inline (Attach_Handler);
  54.  
  55.    procedure Exchange_Handler
  56.       (Old_Handler : out Parameterless_Handler;
  57.        New_Handler : Parameterless_Handler;
  58.        Interrupt   : Interrupt_ID);
  59.    pragma Inline (Exchange_Handler);
  60.  
  61.    procedure Detach_Handler
  62.       (Interrupt : Interrupt_ID);
  63.    pragma Inline (Detach_Handler);
  64.  
  65.    function Reference (Interrupt : Interrupt_ID)
  66.       return System.Address;
  67.  
  68. end Ada.Interrupts;
  69.