{interruptible_,}sleep_on question

Manfred Spraul (manfreds@colorfullife.com)
Mon, 01 Nov 1999 15:31:14 +0100


Is it correct that drivers which call {interruptible_,}sleep_on can miss
wakeup events unless they either own the big kernel lock or the
global-cli lock before calling sleep_on()?

Normally, I would use the sequence
* add_wait_queue
* set_current_state(TASK_UNINTERRUPTIBLE)
* check that you must wait, and that someone will wake you up.
* schedule().

If you use sleep_on(), then the sequence is
* check that you must wait, and that someone will wake you up.
* within sleep_on:
add_wait_queue
set_current_state(TASK_UNINTERRUPTIBLE)
schedule().

If this is really a problem, then (AFAICS) the DAC960 driver could lock
up.

--
	Manfred

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