OSDN Git Service

PR 33870
[pf3gnuchains/gcc-fork.git] / gcc / ada / i-vxwork.ads
index 1ab4585..4818a80 100644 (file)
@@ -1,12 +1,12 @@
 ------------------------------------------------------------------------------
 --                                                                          --
---                 GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS              --
+--                  GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                --
 --                                                                          --
 --                      I N T E R F A C E S . V X W O R K S                 --
 --                                                                          --
 --                                   S p e c                                --
 --                                                                          --
---            Copyright (C) 1999 - 2002 Ada Core Technologies, Inc.         --
+--                     Copyright (C) 1999-2005, AdaCore                     --
 --                                                                          --
 -- GNARL is free software; you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -16,8 +16,8 @@
 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
 -- for  more details.  You should have  received  a copy of the GNU General --
 -- Public License  distributed with GNARL; see file COPYING.  If not, write --
--- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
--- MA 02111-1307, USA.                                                      --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.                                              --
 --                                                                          --
 -- As a special exception,  if other files  instantiate  generics from this --
 -- unit, or you link  this unit with other files  to produce an executable, --
@@ -26,9 +26,8 @@
 -- however invalidate  any other reasons why  the executable file  might be --
 -- covered by the  GNU Public License.                                      --
 --                                                                          --
--- GNARL was developed by the GNARL team at Florida State University. It is --
--- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
--- State University (http://www.gnat.com).                                  --
+-- GNARL was developed by the GNARL team at Florida State University.       --
+-- Extensive contributions were provided by Ada Core Technologies, Inc.     --
 --                                                                          --
 ------------------------------------------------------------------------------
 
 --  In particular, it interfaces with the VxWorks hardware interrupt
 --  facilities, allowing the use of low-latency direct-vectored
 --  interrupt handlers. Note that such handlers have a variety of
---  restrictions regarding system calls. Less restrictive, but higher-
---  latency handlers can be written using Ada protected procedures,
---  Ada 83 style interrupt entries, or by signalling an Ada task
---  from within an interrupt handler using a binary semaphore as
---  described in the VxWorks Programmer's Manual
+--  restrictions regarding system calls and language constructs. In particular,
+--  the use of exception handlers and functions returning variable-length
+--  objects cannot be used. Less restrictive, but higher-latency handlers can
+--  be written using Ada protected procedures, Ada 83 style interrupt entries,
+--  or by signalling an Ada task from within an interrupt handler using a
+--  binary semaphore as described in the VxWorks Programmer's Manual.
 --
 --  For complete documentation of the operations in this package, please
---  consult the VxWorks Programmer's Manual and VxWorks Reference Manual
+--  consult the VxWorks Programmer's Manual and VxWorks Reference Manual.
 
 with System.VxWorks;
 
 package Interfaces.VxWorks is
-   pragma Preelaborate (VxWorks);
+   pragma Preelaborate;
 
    ------------------------------------------------------------------------
    --  Here is a complete example that shows how to handle the Interrupt 0x14
@@ -138,6 +138,10 @@ package Interfaces.VxWorks is
    --  user handler. The routine generates a wrapper around the user
    --  handler to save and restore context
 
+   function intContext return int;
+   --  Binding to the C routine intContext. This function returns 1 only
+   --  if the current execution state is in interrupt context.
+
    function intVecGet
      (Vector : Interrupt_Vector) return VOIDFUNCPTR;
    --  Binding to the C routine intVecGet. Use this to get the
@@ -192,6 +196,7 @@ private
    --  Target-dependent floating point context type
 
    pragma Import (C, intConnect, "intConnect");
+   pragma Import (C, intContext, "intContext");
    pragma Import (C, intVecGet, "intVecGet");
    pragma Import (C, intVecSet, "intVecSet");
    pragma Import (C, INUM_TO_IVEC, "__gnat_inum_to_ivec");