Subject: Re: how do I tell if I'm on the interrupt stack?
To: Matthew Jacob <mjacob@feral.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 09/04/2001 16:49:53
On Wed, 5 Sep 2001, Matthew Jacob wrote:

>
> Hmm? How?
>
> I mean, without mucking with the code that got started outside my driver?

I think the idea is that you make can-sleep and can't-sleep entry points.
All they might do is set a parameter and then call a common routine, which
uses that parameter to tell if it can sleep.

You then tell the things which will call you when you can sleep to use the
can-sleep entry, and the ones which will call you in an interrupt context
you give the can't sleep one.

I am making one big assumption here - that there is no way that one single
registration (like registering an interrupt handler or a call back, etc.)
won't call you sometimes in an interrupt context and sometimes not.

Does that make sense?

Take care,

Bill