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]
Other format: [Raw text]

Re: Ctrl-c interrupt priority


"Enrico Piria" <epiria@libero.it> writes:

> > 
> > > Hello.
> > > 
> > > On architectures supporting interrupt priority levels, at which
> > > priority should the Ctrl-c ISR (the one used to bring up GDB stub)
> > > be run, and why?
> > 
> > I don't think it matters very much. Making it high priority would
> > allow it to preempt any other interrupts. But to be honest, if you
> > have so many lower priority interrupts firing that this actually makes
> > a difference, then you probably have something seriously wrong
> > somewhere.
> > 
> 
> The answer I gave myself, instead, was the following: the ISR should be run
> at the highest maskable priority. This avoids race conditions on the
> hal_saved_interrupt_state variable, that otherwise could be
> rewritten by the architecture HAL interrupt handling code, during
> higher priority interrupts.

Most eCos systems don't use nested interrupts, so this is not an
issue, and the priorities only decide which of several pending
interrupts gets passed to the CPU next. However, if nested interrupts
are being used, then yet, it is probably a good idea to make the
Ctrl-C interrupt higher priority than any others.


-- 
Nick Garnett                                     eCos Kernel Architect
http://www.ecoscentric.com                The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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