[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Problems when polling interrupt register



On Fri, 28 Sep 2001, Mikael Starvik wrote:
> >Do you think this is possible? If so, can I request the interrupt as
> >SA_INTERRUPT and avoid that the interrupt is interrupted?
> 
> SA_INTERRUPT means that the interrupt itself is not shared between
> different devices. It has nothing to do with if interrupts are enabled
> or not. Constructions like the following code can be used to make

Not true, SA_INTERRUPT means that the interrupt cannot be interrupted,
it's also known as a "fast interrupt". Sharing is controlled by
SA_SHIRQ, not allowed per default.

An interrupt registred with SA_INTERRUPT, never enables the interrupts
during execution of the handler.

> Also note that the normal interrupt handlers already has interrupts
> disabled while processing. If you need to do much stuff in the 
> interrupt handler you should register a bottom-half handler to
> avoid locking out the interrupts too much.

Not true - all 2.4 interrupts except the serial-port handlers are non
SA_INTERRUPT, meaning they are nested and can be interrupted by other
interrupts. 

Bottom-halves are deprecated in Linux 2.4, because they don't do anything
useful (since they still run in interrupt-context, just at another
time). Tasklets or kernel threads should be used for things that need to
run in non-interrupt context.

/Bjorn