Re: linux interrupt handling problem

Richard B. Johnson (root@chaos.analogic.com)
Mon, 8 Nov 1999 11:19:56 -0500 (EST)


On Mon, 8 Nov 1999, Roman Zippel wrote:

> Hi,
>
> On the m68k mailing list we have a discussion about portability of
> interrupts. The main problem is the possible use of sti() in interrupt
> handler.
>
[SNIPPED info]

This should work if you must enable interrupts in the interrupt handler.

typedef struct {
........;
........;
int busy;
} INFO;

static void device_isr (int irq, void *p, struct pt_regs *regs)
{
INFO *inf = (INFO *) p;
if(inf->busy++)
return;
while(inf->busy--) /* Check this with interrupts off */
do_stuff(); /* If necessary with interrupts enabled */
return;
}

Cheers,
Dick Johnson

Penguin : Linux version 2.3.13 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/