Subject: Re: Interrupt, interrupt threads, continuations, and kernel lwps
To: jonathan@dsg.stanford.edu, Andrew Doran <ad@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 02/23/2007 21:18:43
On Thu, Feb 22, 2007 at 08:27:56PM -0800, Bill Studenmund wrote:
> 
> As I understand it, the difficulty comes in when the mutex is held by a 
> thread that is not running. In that case, the interrupt handler blocks. In 
> that case, the interrupt handler has to be blocked, and the interrupt has 
> to be disabled/ignored until serviced. For systems with a PIC, we disable 
> the interrupt and cope.

Why don't be disable context switches while a mutex (that may be acquired
by an ISR) is held ?
After non-adaptive mutex are not allowed to be held across functions
that can sleep.
This would mean that the only code that might have to be executed is
the kernel code of the interrupted process.

	David

-- 
David Laight: david@l8s.co.uk