diff options
author | Ed Falis <falis@adacore.com> | 2016-10-13 12:57:16 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-10-13 14:57:16 +0200 |
commit | 870ce4d51bfe22b2c86fd5ee9fa2e5f4642cd572 (patch) | |
tree | 6c12f2315542940f60d49919684b6c9c14791ce7 /gcc/ada | |
parent | 07820c51656042bbed6eb9661d33d4bec1f04c47 (diff) | |
download | gcc-870ce4d51bfe22b2c86fd5ee9fa2e5f4642cd572.zip gcc-870ce4d51bfe22b2c86fd5ee9fa2e5f4642cd572.tar.gz gcc-870ce4d51bfe22b2c86fd5ee9fa2e5f4642cd572.tar.bz2 |
* i-vxinco.adb, i-vxinco.ads: New files.
From-SVN: r241114
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 1 | ||||
-rw-r--r-- | gcc/ada/i-vxinco.adb | 48 | ||||
-rw-r--r-- | gcc/ada/i-vxinco.ads | 56 |
3 files changed, 105 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 2b70994..7ea6b94 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -16,6 +16,7 @@ 2016-10-13 Ed Falis <falis@adacore.com> + * i-vxinco.adb, i-vxinco.ads: New files. * impunit.adb: add i-vxinco.ads. * s-interr-vxworks.adb: add hook for user interrupt connection routine. diff --git a/gcc/ada/i-vxinco.adb b/gcc/ada/i-vxinco.adb new file mode 100644 index 0000000..6418af1 --- /dev/null +++ b/gcc/ada/i-vxinco.adb @@ -0,0 +1,48 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- +-- -- +-- I N T E R F A C E S . V X W O R K S . I N T _ C O N N E C T I O N -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 2016, 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- -- +-- ware Foundation; either version 3, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. -- +-- -- +-- As a special exception under Section 7 of GPL version 3, you are granted -- +-- additional permissions described in the GCC Runtime Library Exception, -- +-- version 3.1, as published by the Free Software Foundation. -- +-- -- +-- You should have received a copy of the GNU General Public License and -- +-- a copy of the GCC Runtime Library Exception along with this program; -- +-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- +-- <http://www.gnu.org/licenses/>. -- +-- -- +-- GNARL was developed by the GNARL team at Florida State University. -- +-- Extensive contributions were provided by Ada Core Technologies, Inc. -- +-- -- +------------------------------------------------------------------------------ + +package body Interfaces.VxWorks.Int_Connection is + + Connection_Routine : Interrupt_Connector; + pragma Import (C, Connection_Routine, "__gnat_user_int_connect"); + -- Declared in System.Interrupts. Defaults to the standard OS connector in + -- System.OS_Interface (or Interfaces.VxWorks for restricted runtimes). + + ------------- + -- Connect -- + ------------- + + procedure Connect (Connector : Interrupt_Connector) is + begin + Connection_Routine := Connector; + end Connect; + +end Interfaces.VxWorks.Int_Connection; diff --git a/gcc/ada/i-vxinco.ads b/gcc/ada/i-vxinco.ads new file mode 100644 index 0000000..04ae6cf --- /dev/null +++ b/gcc/ada/i-vxinco.ads @@ -0,0 +1,56 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- +-- -- +-- I N T E R F A C E S . V X W O R K S . I N T _ C O N N E C T I O N -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2016, 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- -- +-- ware Foundation; either version 3, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. -- +-- -- +-- As a special exception under Section 7 of GPL version 3, you are granted -- +-- additional permissions described in the GCC Runtime Library Exception, -- +-- version 3.1, as published by the Free Software Foundation. -- +-- -- +-- You should have received a copy of the GNU General Public License and -- +-- a copy of the GCC Runtime Library Exception along with this program; -- +-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- +-- <http://www.gnu.org/licenses/>. -- +-- -- +-- GNARL was developed by the GNARL team at Florida State University. -- +-- Extensive contributions were provided by Ada Core Technologies, Inc. -- +-- -- +------------------------------------------------------------------------------ + +-- This package provides users with the ability to use a custom routine for +-- connecting hardware interrupts for VxWorks environments that support the +-- capability to handle them. The custom routine must have the same profile +-- as the VxWorks intConnect() routine. + +with System; + +package Interfaces.VxWorks.Int_Connection is + + type Interrupt_Connector is access function + (Vector : Interrupt_Vector; + Handler : VOIDFUNCPTR; + Parameter : System.Address := System.Null_Address) return STATUS; + pragma Convention (C, Interrupt_Connector); + -- Convention C for compatibility with intConnect(). User alternatives are + -- likely to be imports of C routines anyway. + + procedure Connect (Connector : Interrupt_Connector); + -- Set user-defined interrupt connection routine. Must precede calls to + -- Ada.Interrupts.Attach_Handler, or the default connector from + -- System.OS_Interface (or Interfaces.VxWorks for Ravenscar Cert) will be + -- used. Can be called multiple times to change the connection routine for + -- subsequent calls to Attach_Handler. + +end Interfaces.VxWorks.Int_Connection; |