From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Larmour To: Sandeep Rikhi Cc: "eCos Discussion Gp." Subject: Re: [ECOS] Nested Interrupts. Date: Mon, 11 Sep 2000 07:53:00 -0000 Message-id: <39BCF202.89E5D376@redhat.com> References: X-SW-Source: 2000-09/msg00135.html 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