Re: Interrupt trouble due to IRQ router VIA?

Alan Cox (alan@lxorguk.ukuu.org.uk)
01 Aug 2002 01:34:53 +0100


On Wed, 2002-07-31 at 21:15, Kathy Frazier wrote:
> another system. In this system, the driver times out on the
> interruptible_sleep_on_timeout waiting for the interrupt. One thing that I

There is a classic kernel programming error which goes something like
this

my_interrupt()
{
foo->ready = 1;
wake_up(&foo_pending);
}

foo_read()
{
while(!foo->ready && !signal_pending(current))
interruptible_sleep_on(&foo_pending);

}

What happens then is this

foo->ready = 0 - true
signal pending = 0 - ok

INTERRUPT
foo->ready=1
wake up
END INTERRUPT

interruptible_sleep_on(&foo_pending);

Waits forever

It could be your timings have changed so such a bug now shows up

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