lkml.org 
[lkml]   [1999]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: linux interrupt handling problem
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/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.084 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site