Subject: Re: how do I tell if I'm on the interrupt stack?
To: None <tech-kern@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 09/05/2001 18:11:18
> if you test the curproc pointer, a zero value implies no process is
> currently running, you would thus have hit the code path from the
> kernel's hardclock function.

Yes, if curproc is nil, you must be in interrupt context.  However, if
curproc is not nil, you might not be in an interrupt context - but you
also might be, since hardclock interrupts can interrupt a process.

AIUI, at least.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B