Ada Interrupt Tasks

Joel Sherrill joel.sherrill@oarcorp.com
Wed Oct 17 21:32:00 GMT 2007


Hi,

I have Ada interrupt tasks that are attached
to real hardware interrupts working for RTEMS.
I based the RTEMS code on the existing code
for VxWorks. 

I tried to minimize my modifications since I
could tell that the OS functionality used was
very generic.  But since the implementation
in s-interr-vxworks.adb binds directly to VxWorks
specific calls, I had to make an s-interr-rtems.adb
to account solely for API differences.  If the
VxWorks code had been implemented with a glue
layer to the VxWorks API, I would not have had
to copy the file in its 1147 line entirety.

I would like to suggest that s-osinte.ad?
or (less desirable) a new package have adapter/facades
to the OS specific routines required to implement
Ada tasks attached to hardware interrupt sources.

I have a list of functionality that would have
to be in the adapter set:

+ simple binary semaphore
  - create
  - delete
  - obtain
  - release
  - flush
+ hardware interrupts
  - maximum hardware interrupts
  - connect
  - get handler
  - set handler
  - interrupt number to hardware vector

This functionality must be in a common place so
the s-interr-hwint.adb doesn't have to "with VxWorks"
or "with RTEMS".  The names of the new elements
shouldn't reflect either RTEMS or VxWorks.  They
are just capabilities that the s-interr-hwint.adb
requires.

Comments and suggestions are welcomed.

--joel



More information about the Gcc mailing list