aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/libgnarl
diff options
context:
space:
mode:
authorAshley Gay <gay@adacore.com>2023-11-17 11:50:03 +0100
committerMarc Poulhiès <poulhies@adacore.com>2024-05-13 10:03:29 +0200
commiteff0e268f4b1c4d8783f1da4e8a54028a3e28a1a (patch)
tree3c2a8a8d8f6e7c79c69caebb7962919940fbe80e /gcc/ada/libgnarl
parent56e781f6b83ddf26ae42309e682dc22ce4db3f82 (diff)
downloadgcc-eff0e268f4b1c4d8783f1da4e8a54028a3e28a1a.zip
gcc-eff0e268f4b1c4d8783f1da4e8a54028a3e28a1a.tar.gz
gcc-eff0e268f4b1c4d8783f1da4e8a54028a3e28a1a.tar.bz2
ada: Remove deprecated VxWorks interrupt connection API
The VxWorks 7 API to use hardware interrupts is the VxBus subsystem. GNAT API still provides bindings for the deprecated (VxWorks 6) routines. A direct consequence of this change is that Attach_Handler cannot be used anymore (the VxBus subsystem should be used instead). This patch removes all the functions that are not supported by VxWorks 7 anymore. To warn for the usage of Attach_Handler, it adds the 'Obsolescent' pragma to to this routine so the comiler will advise the user if this function is called directly or through a pragma. gcc/ada/ * Makefile.rtl: remove i-vxinco.* from the build * doc/gnat_rm/the_gnat_library.rst: Remove i-vxinco.ads from the units documentation. * impunit.adb: Remove i-vxinco from the list of available units in GNATstudio. * libgnarl/i-vxinco.adb: Remove. * libgnarl/i-vxinco.ads: Ditto. * libgnarl/s-interr__vxworks.adb: enrich comment * libgnarl/s-vxwext__kernel.ads: fix comment * libgnat/i-vxwork.ads: Remove deprecated interrupt connections API, as well as an example. * libgnat/i-vxwork__x86.ads: Ditto and add the paragma Obscolescent to Attach_Handler * gnat_rm.texi: Regenerate.
Diffstat (limited to 'gcc/ada/libgnarl')
-rw-r--r--gcc/ada/libgnarl/i-vxinco.adb48
-rw-r--r--gcc/ada/libgnarl/i-vxinco.ads56
-rw-r--r--gcc/ada/libgnarl/s-interr__vxworks.adb5
-rw-r--r--gcc/ada/libgnarl/s-vxwext__kernel.ads2
4 files changed, 5 insertions, 106 deletions
diff --git a/gcc/ada/libgnarl/i-vxinco.adb b/gcc/ada/libgnarl/i-vxinco.adb
deleted file mode 100644
index 91ca22b..0000000
--- a/gcc/ada/libgnarl/i-vxinco.adb
+++ /dev/null
@@ -1,48 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- 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-2024, 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/libgnarl/i-vxinco.ads b/gcc/ada/libgnarl/i-vxinco.ads
deleted file mode 100644
index 9422a85..0000000
--- a/gcc/ada/libgnarl/i-vxinco.ads
+++ /dev/null
@@ -1,56 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- 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-2024, 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;
diff --git a/gcc/ada/libgnarl/s-interr__vxworks.adb b/gcc/ada/libgnarl/s-interr__vxworks.adb
index 92d6bb8..10839c6 100644
--- a/gcc/ada/libgnarl/s-interr__vxworks.adb
+++ b/gcc/ada/libgnarl/s-interr__vxworks.adb
@@ -208,7 +208,9 @@ package body System.Interrupts is
(Vector : Interrupt_Vector;
Handler : Interrupt_Handler;
Parameter : System.Address := System.Null_Address) return STATUS;
- -- Profile must match VxWorks intConnect()
+ -- Profile must match VxWorks intConnect() for VxWorks prior to 7.
+ -- VxWorks 7 does not support intConnect(). The Vxbus subsystem
+ -- should be used instead.
Interrupt_Connect : Interrupt_Connector :=
System.OS_Interface.Interrupt_Connect'Access;
@@ -271,6 +273,7 @@ package body System.Interrupts is
Check_Reserved_Interrupt (Interrupt);
Interrupt_Manager.Attach_Handler (New_Handler, Interrupt, Static);
end Attach_Handler;
+ pragma Obsolescent (Attach_Handler, "Use the VXBus subsystem instead");
-----------------------------
-- Bind_Interrupt_To_Entry --
diff --git a/gcc/ada/libgnarl/s-vxwext__kernel.ads b/gcc/ada/libgnarl/s-vxwext__kernel.ads
index 6665099..25dcbd3 100644
--- a/gcc/ada/libgnarl/s-vxwext__kernel.ads
+++ b/gcc/ada/libgnarl/s-vxwext__kernel.ads
@@ -29,7 +29,7 @@
-- This package provides vxworks specific support functions needed
-- by System.OS_Interface.
--- This is the VxWorks 6 kernel version of this package
+-- This is the VxWorks 7 kernel version of this package
with Interfaces.C;