Skip to contentSkip to conversation

Interrupt Handling and sleep/wake_up

Newbie Manfred Spraul 2 participants 2 messages Sep 22, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines
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

#1 lore raw
Quoted 8 lines

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.

Thanks: Updated