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-inmaop.ads < prev    next >
Text File  |  2000-07-19  |  6KB  |  123 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS               --
  4. --                                                                          --
  5. --            S Y S T E M . I N T E R R U P T _ M A N A G E M E N T .       --
  6. --                             O P E R A T I O N S                          --
  7. --                                                                          --
  8. --                                  S p e c                                 --
  9. --                                                                          --
  10. --                             $Revision: 1.4 $                            --
  11. --                                                                          --
  12. --          Copyright (C) 1992-1998, Free Software Foundation, Inc.         --
  13. --                                                                          --
  14. -- GNARL is free software; you can  redistribute it  and/or modify it under --
  15. -- terms of the  GNU General Public License as published  by the Free Soft- --
  16. -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
  17. -- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
  18. -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  19. -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
  20. -- for  more details.  You should have  received  a copy of the GNU General --
  21. -- Public License  distributed with GNARL; see file COPYING.  If not, write --
  22. -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
  23. -- MA 02111-1307, USA.                                                      --
  24. --                                                                          --
  25. -- As a special exception,  if other files  instantiate  generics from this --
  26. -- unit, or you link  this unit with other files  to produce an executable, --
  27. -- this  unit  does not  by itself cause  the resulting  executable  to  be --
  28. -- covered  by the  GNU  General  Public  License.  This exception does not --
  29. -- however invalidate  any other reasons why  the executable file  might be --
  30. -- covered by the  GNU Public License.                                      --
  31. --                                                                          --
  32. -- GNARL was developed by the GNARL team at Florida State University. It is --
  33. -- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
  34. -- State University (http://www.gnat.com).                                  --
  35. --                                                                          --
  36. ------------------------------------------------------------------------------
  37.  
  38. package System.Interrupt_Management.Operations is
  39.  
  40.    procedure Thread_Block_Interrupt (Interrupt : Interrupt_ID);
  41.    --  Mask the calling thread for the interrupt
  42.    pragma Inline (Thread_Block_Interrupt);
  43.  
  44.    procedure Thread_Unblock_Interrupt (Interrupt : Interrupt_ID);
  45.    --  Unmask the calling thread for the interrupt
  46.    pragma Inline (Thread_Unblock_Interrupt);
  47.  
  48.    procedure Set_Interrupt_Mask (Mask : access Interrupt_Mask);
  49.    --  Set the interrupt mask of the calling thread
  50.    procedure Set_Interrupt_Mask
  51.      (Mask  : access Interrupt_Mask;
  52.       OMask : access Interrupt_Mask);
  53.    --  Set the interrupt mask of the calling thread while returning the
  54.    --  previous Mask.
  55.    pragma Inline (Set_Interrupt_Mask);
  56.  
  57.    procedure Get_Interrupt_Mask (Mask : access Interrupt_Mask);
  58.    --  Get the interrupt mask of the calling thread
  59.    pragma Inline (Get_Interrupt_Mask);
  60.  
  61.    function Interrupt_Wait (Mask : access Interrupt_Mask) return Interrupt_ID;
  62.    --  Wait for the interrupts specified in Mask and return
  63.    --  the interrupt received. Upon error it return 0.
  64.    pragma Inline (Interrupt_Wait);
  65.  
  66.    procedure Install_Default_Action (Interrupt : Interrupt_ID);
  67.    --  Set the sigaction of the Interrupt to default (SIG_DFL).
  68.    pragma Inline (Install_Default_Action);
  69.  
  70.    procedure Install_Ignore_Action (Interrupt : Interrupt_ID);
  71.    --  Set the sigaction of the Interrupt to ignore (SIG_IGN).
  72.    pragma Inline (Install_Ignore_Action);
  73.  
  74.    procedure Fill_Interrupt_Mask (Mask : access Interrupt_Mask);
  75.    --  Get a Interrupt_Mask with all the interrupt masked
  76.    pragma Inline (Fill_Interrupt_Mask);
  77.  
  78.    procedure Empty_Interrupt_Mask (Mask : access Interrupt_Mask);
  79.    --  Get a Interrupt_Mask with all the interrupt unmasked
  80.    pragma Inline (Empty_Interrupt_Mask);
  81.  
  82.    procedure Add_To_Interrupt_Mask
  83.      (Mask      : access Interrupt_Mask;
  84.       Interrupt : Interrupt_ID);
  85.    --  Mask the given interrupt in the Interrupt_Mask
  86.    pragma Inline (Add_To_Interrupt_Mask);
  87.  
  88.    procedure Delete_From_Interrupt_Mask
  89.      (Mask      : access Interrupt_Mask;
  90.       Interrupt : Interrupt_ID);
  91.    --  Unmask the given interrupt in the Interrupt_Mask
  92.    pragma Inline (Delete_From_Interrupt_Mask);
  93.  
  94.    function Is_Member
  95.      (Mask      : access Interrupt_Mask;
  96.       Interrupt : Interrupt_ID) return Boolean;
  97.    --  See if a given interrupt is masked in the Interrupt_Mask
  98.    pragma Inline (Is_Member);
  99.  
  100.    procedure Copy_Interrupt_Mask (X : out Interrupt_Mask; Y : Interrupt_Mask);
  101.    --  Assigment needed for limited private type Interrupt_Mask.
  102.    pragma Inline (Copy_Interrupt_Mask);
  103.  
  104.    procedure Interrupt_Self_Process (Interrupt : Interrupt_ID);
  105.    --  raise an Interrupt process-level
  106.    pragma Inline (Interrupt_Self_Process);
  107.  
  108.    --  The following objects serve as constants, but are initialized
  109.    --  in the body to aid portability.  These actually belong to the
  110.    --  System.Interrupt_Management but since Interrupt_Mask is a
  111.    --  private type we can not have them declared there.
  112.  
  113.    Environment_Mask : aliased Interrupt_Mask;
  114.    --  This mask represents the mask of Environment task when this package
  115.    --  is being elaborated, except the signals being
  116.    --  forced to be unmasked by RTS (items in Keep_Unmasked)
  117.  
  118.    All_Tasks_Mask : aliased Interrupt_Mask;
  119.    --  This is the mask of all tasks created in RTS. Only one task in RTS
  120.    --  is responsible for masking/unmasking signals (see s-interr.adb).
  121.  
  122. end System.Interrupt_Management.Operations;
  123.