Interrupt catch

Joel Sherrill joel.sherrill at OARcorp.com
Wed Oct 18 14:37:37 UTC 2000


Alejandro Villanueva wrote:
> 
> Joel Sherrill wrote:
> 
> > Alejandro Villanueva wrote:
> > >
> > > Hello,
> > >
> > > I'm trying to catch IRQ7 in the pc386 BSP both under C and under
> > Ada.
> > > Could anyone tell me how to catch it, please?
> >
> > Everyone has given you the C answer without providing the
> > "Ada" answer.  If you are using Ada interrupts in the
> > Ada language sense, then you still have to have a real
> > hardware interrupt handler.  Then it is propagated with
> > POSIX signals to the Ada run-time to be presented to the
> > Ada application as an Ada interrupt.
> >
> > The only function version of this included in the source
> > tree is for the sparc/erc32.  See gnatsupp.c.  It provides
> > a real body for  __gnat_install_handler().
> >
> 
> Joel, I'm working on a i386, so the only hardware interrupt handler is
> the PIC, so this is my new question: Will it be easier to implement
> the interrupt handler in C using irq.h and then importing the handler
> into Ada via pragma Import or to implement it directly in Ada not
> knowing how to do it?

Implement it in C and then import the interface.  This will
minimize how much C code you have to map to Ada.

Besides, I think all the C interrupt handler has to do is send
a signal and then the Ada language interrupt handler can do the
rest.  There is an example program of this in the Ada examples.

> Thanks,
> 
> Alejandro.
> 
> 
> >
> > > Thanks,
> > >
> > > ------------------------------------------------------
> > > Alejandro Villanueva
> > > 190921 at cepsz.unizar.es
> > > ------------------------------------------------------
> > >
> > >
> >
> > --
> > Joel Sherrill, Ph.D.             Director of Research & Development
> > joel at OARcorp.com                 On-Line Applications Research
> > Ask me about RTEMS: a free RTOS  Huntsville AL 35805
> >    Support Available             (256) 722-9985
> 
> --
> ------------------------------------------------------
> ¿Quieres Cobrar por Navegar en Internet?
> Visita: http://www.navegana.com/dinero/flintstone.html
> ------------------------------------------------------
> Alejandro Villanueva
> 190921 at cepsz.unizar.es
> ------------------------------------------------------
> 
> 

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985



More information about the users mailing list