This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
question about isr function signature (profiling)
- From: "Yuxin Jiang" <yjiang at matrics dot com>
- To: "Ecos-Discuss" <ecos-discuss at sources dot redhat dot com>
- Date: Fri, 26 Mar 2004 17:30:25 -0500
- Subject: [ECOS] question about isr function signature (profiling)
- Reply-to: <yjiang at matrics dot com>
For ARM7TDMI core, I want to define a ISR service routine, as following:
// ISR.
static cyg_uint32
timer_isr(CYG_ADDRWORD vector, CYG_ADDRWORD data, HAL_SavedRegisters *regs)
{
HAL_INTERRUPT_ACKNOWLEDGE (CYGNUM_HAL_INTERRUPT_PROFILE_TIMER);
__profile_hit(regs->pc);
return CYG_ISR_HANDLED;
}
My question is: is the signature for the timer_isr correct?
To be specific, is it correct to declare that there is a third parameter for
a isr, and this third parameter is a pointer to the HAL_SavedRegisters
structure, and the structure has correct (updated) context registers value
at the moment the interrupt occurs?
As you can see, I am trying to do profiling. But I am not sure I actually
get the correct pc value passed into the __profile_hit() function call.
Any insight is appreciated.
Yuxin Jiang
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss