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: Nested Interrupts.


Sandeep Rikhi wrote:
> 
>  In case an interrupt has occured and we are in the ISR part of it.
> Suppose at the same time a high priority interrupt ( say a
> reset) occurs... what would be the situation then? Do we leave the current
> ISR and switch over to new interrupt ( high priority ). If it is so, what
> was the effect of disabling the interrupts?

Interrupts are completely disabled while ISRs are running. ISRs are meant
to be very short with any substantial work deferred to a DSR, or better
still by the DSR then waking a thread. Typically, if more work is being
done in a DSR, then the ISR will mask the interrupt. This then allows other
interrupts to be processed.

With many systems, masking the interrupt will actually mask that interrupt
*and* all lower priority ones, so that you only receive higher priority
ones (until the interrupt is unmasked in the DSR). It depends on the
interrupt controller being used, although you could also write
HAL_INTERRUPT_MASK() for your particular platform to do this "manually" -
this isn't done by default, as this requires tracking what interrupts are
available in the system and their priority.

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

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