Re: interrupt handling w/o handler?

Mark Lord (mlord@pobox.com)
Sun, 11 Jul 1999 09:58:55 -0400


Jes Sorensen wrote:
>
> >>>>> "Jeff" == Jeff Garzik <jgarzik@pobox.com> writes:
>
> Jeff> Is there a function available to drivers that allows something
> Jeff> like: ... interruptible_sleep_on_irq (9); /* wait on IRQ 9 */
..
> You have to register a handler for thaat, otherwise how are you
> guaranteed that the interrupt is handled and the hardware doesn't keep
> reasserting the same interrupt over and over again.

I think Jeff might be looking for a function such as:

interruptable_sleep_on_irq(n):
-- allocate unused irq(n), bind in generic_irqhandler(n)
-- save PID in wakeuptable(n)
-- unmask irq(n)
-- sleep until woken up by generic_irqhandler(n)
-- deallocate irq(n)
-- exit

generic_irqhandler(n):
-- permanently mask irq(n)
-- wakeup(wakeuptable(n))
-- exit

Those two functions could then be made available to user-level
either through /proc or a newsyscall, thereby permitting *user-level*
interrupt handling ("virtual device drivers" from userland).

Wow!

-- 
mlord@pobox.com

- 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/