Re: {interruptible_,}sleep_on question

Andreas Bombe (andreas.bombe@munich.netsurf.de)
Mon, 1 Nov 1999 21:30:54 +0100


On Mon, Nov 01, 1999 at 11:28:18AM -0500, Richard B. Johnson wrote:
> On Mon, 1 Nov 1999, Manfred Spraul wrote:
>
> > 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()?
> >
> [SNIPPED]
>
> The opposite. Nobody can sleep if a global lock is held or the interrupts
> are disabled. To do so is death.

The big kernel lock (as opposed to the standard spinlocks) is released
on schedule and reaquired when control returns. IIRC, the same happens
for disabled IRQs (enabled on schedule, disabled on return).

Nevertheless, a simple, bare sleep_on is rarely useful for hardware
programming.

-- 
    Andreas E. Bombe <andreas.bombe@munich.netsurf.de>
    http://home.pages.de/~andreas.bombe/
RSA 0x886663c9  30 EC 09 73 84 7B 55 83  C4 7A 91 D9 9D C5 4B B0
DSA 0x04880A44 72E5 7031 4414 2EB6 F6B4  4CBD 1181 7032 0488 0A44

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