Subject: Re: how do I tell if I'm on the interrupt stack?
To: Greg Lehey <grog@lemis.com>
From: Darren Reed <darrenr@reed.wattle.id.au>
List: tech-kern
Date: 09/06/2001 12:08:54
In some email I received from Greg Lehey, sie wrote:
> On Wednesday, 5 September 2001 at 20:46:35 -0400, Bill Sommerfeld wrote:
> >> Correct me if I'm wrong, but IIUC processes run with all interrupts
> >> enabled.
> >
> > you're wrong ;-). interrupts are masked by splwhatever()/splx()
>
> I stand corrected.
>
> Matt has a good point, though. How about something like FreeBSD's
> intr_nesting_level?
Personally, I think a global variable like that is a terrible hack.
I can see how it would be useful but good code design should remove
the need for it to be present. I'd much prefer to see different
entry points pass information along about the current context in
which it is running.
Darren