This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ISR parameter question


On Fri, Sep 07, 2001 at 05:00:19PM -0500, Grant Edwards wrote:
> I'm looking at hal/arm/aeb/hal_misc.c, and the abort ISR
> routine is
> 
>   static int
>   aeb_abort_isr(cyg_vector_t vector, cyg_addrword_t data, HAL_SavedRegisters *regs)
>   {
>       cyg_hal_user_break((CYG_ADDRWORD*)regs);
>       cyg_drv_interrupt_acknowledge(CYGNUM_HAL_INTERRUPT_EXT0);
>       return 0;  // No need to run DSR
>   }
> 
> I can't find any mention of the third parameter to an ISR in
> the Kernel API docs. Is that third parameter passed to ISR
> routines? 

Yes, its an undocumentated feature. The assembly code which calls your
isr functions passes an extra parameter. This is the register set for
what ever the interrupt interrupted. So regs->pc is the program
counter when the interrupt happened.

Since this is undocumented, its not an official part of the API. It
could change any time....but i've been using it since December 1999
without a problem.

        Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]