[Newbie] Interrupt Handling and sleep/wake_up

Manfred Spraul (manfred@colorfullife.com)
Sat, 22 Sep 2001 14:26:45 +0200


> void bdDoSomething(){
> setup_buffers_for_interrupt_routing();
> tell_board_to_start_reading_or_writing();
> /***** BOARD THROWS ITS INTERRUPTS HERE!!! *****/
> interruptible_sleep_on_timeout(&irq_wqueue,PCIIA_SLEEP_TIMEOUT);
> }
>
Just do not use sleep_on, use wait_event or a manual wait loop.

check the mouse driver sample from Alan Cox:
linux/Documentation/DocBook/mousedriver.tmpl

The document is slightly outdated:

* do not access current->state directly, use set_current_state.
* do not use MOD_INC_USE_COUNT, set module->owner to THIS_MODULE
instead.

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