This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
Currently VxWorks is the only target in gcc to support Ada interrupt tasks which are tied to hardware interrupt sources. The code in gcc currently is VxWorks specific. The patch attached generalizes this code by adding an adapter layer consisting of binary semaphores and interrupt management methods. These are generalized names for the routines currently used in the VxWorks code. A diff of the existing s-interr-vxworks.adb and the new s-interr-hwint.adb will show the largely mechanical changes. Both VxWorks and RTEMS targets have been modified to use this code. It has been tested on RTEMS. The code was first posted to gcc-patches in December 2007 against the 4.2 branch and SVN trunk. All comments were addressed and the code was reposted again in early March 2008 to gcc-patches. It received only comments on mistakes in the comments which were inherited directly from the original VxWorks code. I am filing this as a PR in the hopes that this will result in it finally getting merged.
Created an attachment (id=15309) [edit] Ada HW Interrupt Task Enhancement
2007-12-06 Joel Sherrill <joel.sherrill@oarcorp.com> * Makefile.in: Switch RTEMS and VxWorks to s-interr-hwint.adb. * s-interr-hwint.adb: New file with portable implementation. * s-interr-vxworks.adb: Removed. * s-osinte-rtems.adb, s-osinte-rtems.ads, s-osinte-vxworks.adb, s-osinte-vxworks.ads: Add shared hardware interrupt adapter layer.
Patch is still valid against 3 April SVN trunk. Confirmed on SPARC. sparc-rtems4.9-gcc (GCC) 4.4.0 20080403 (experimental) [trunk revision 133868]
Created an attachment (id=15505) [edit] Updated to 4.4.0 20080421 (experimental) [trunk revision 134514] Requires patch in http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01581.html to even compile Ada targeting RTEMS on the trunk.
Tested against this GCC using gcc-ada-hwint-20080421.diff and patch in http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01581.html sparc-rtems4.9-gcc (GCC) 4.4.0 20080421 (experimental) [trunk revision 134514]
Tested against this GCC using gcc-ada-hwint-20080421.diff and patch in http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01581.html sparc-rtems4.9-gcc (GCC) 4.4.0 20080502 (experimental) [trunk revision 134885]
Created an attachment (id=15612) [edit] hwint patch for gcc 4.3 branch This has been tested against sparc-rtems4.9 for interrupt functionality. ACATS results reported for mips, i386, powerpc, and sparc.
Patch against SVN trunk still OK using 20080519 (experimental) [trunk revision 135528]
Created an attachment (id=15692) [edit] Latest version Previous patch did not include s-interr-hwint.adb. There is no patch to s-osinte-rtems.adb since the .ads binds directly to OS provided routines.
Updated changelog entry. I missed adding the s-hwint-interr.adb file when I replaced my svn tree a while back. There are no modifications to s-osinte-rtems.adb. The .ads just binds to more routines provided by RTEMS. 2008-05-28 Joel Sherrill <joel.sherrill@oarcorp.com> * Makefile.in: Switch RTEMS and VxWorks to s-interr-hwint.adb. * s-interr-hwint.adb: New file with portable implementation. * s-interr-vxworks.adb: Removed. * s-osinte-rtems.ads, s-osinte-vxworks.adb, s-osinte-vxworks.ads: Add shared hardware interrupt adapter layer. RTEMS binds to OS provided adapter routines so there are no modifications to s-osinte-rtems.adb.
Created an attachment (id=15723) [edit] updated patch Updated to account for changes to s-osinte-vxworks.adb while this PR has lingered in the queue.
s-osinte-vxworks.adb is not removed by the patch. For review purposes, you should diff s-osinte-vxworks.adb to s-osinte-hwint.adb to see what the changes were. 2008-05-28 Joel Sherrill <joel.sherrill@oarcorp.com> * Makefile.in: Switch RTEMS and VxWorks to s-interr-hwint.adb. * s-interr-hwint.adb: New file with portable implementation. This is a mechanical change of s-interr-vxworks.adb to use the new OS provided adapter. * s-interr-vxworks.adb: Removed. * s-osinte-rtems.ads, s-osinte-vxworks.adb, s-osinte-vxworks.ads: Add shared hardware interrupt adapter layer. RTEMS binds to OS provided adapter routines so there are no modifications to s-osinte-rtems.adb.
Created an attachment (id=15724) [edit] Actual patch against svn (this time)
ChangeLog entry for gcc-svn-ada-hwint-20080606.diff. Patch does not remove s-interr-vxworks.adb. As part of review please "diff -u s-interr-vxworks.adb s-interr-hwint.adb" You should only see changes to eliminate references to VxWorks specific packages and to use the adapter routines instead of VxWorks specific ones. 2008-06-06 Joel Sherrill <joel.sherrill@oarcorp.com> * Makefile.in: Switch RTEMS and VxWorks to s-interr-hwint.adb. * s-interr-hwint.adb: New file with portable implementation. This is a mechanical change of s-interr-vxworks.adb to use the new OS provided adapter. * s-interr-vxworks.adb: Removed. * s-osinte-rtems.ads, s-osinte-vxworks.adb, s-osinte-vxworks.ads: Add shared hardware interrupt adapter layer. RTEMS binds to OS provided adapter routines so there are no modifications to s-osinte-rtems.adb.
Created an attachment (id=16032) [edit] Lastest version of patch (against rev 138553) hwint tested on sparc. ACATS results posted for sparc, mips, i386, powerpc, and arm
(From update of attachment 15724 [edit]) Obsoleted by 20080806 patch
Created an attachment (id=16033) [edit] New file not in 20080806 diff. Must go with http://gcc.gnu.org/bugzilla/attachment.cgi?id=16032
Created an attachment (id=16034) [edit] Latest version against revision 138553 Goes with http://gcc.gnu.org/bugzilla/attachment.cgi?id=16033 s-interr-hwint.adb can be diffed against s-interr-vxworks.adb to see what was done to make it generic.
Now merged on SVN trunk. Closing. Thanks Arnaud.