Subject: Re: splserial() higher than splhigh()?
To: David Querbach <querbach@realtime.bc.ca>
From: Allen Briggs <briggs@wasabisystems.com>
List: tech-kern
Date: 01/31/2001 22:18:51
On Wed, Jan 31, 2001 at 10:08:10AM -0800, David Querbach wrote:
> Thanks for that confirmation.  Here's what I'm thinking of doing:

This looks good, except that I am somewhat concerned about...

> 		Loop over the software interrupts until no more are pending
> 		and unmasked.

This makes sense, but I am leery of having a loop in the interrupt
handler.  This is probably just superstition on my part.  If, for
example, we have a load of serial interrupts coming in, the
SINT_SERIAL will be almost continually set and this could keep
looping for quite a while.  Now, maybe this is what you want in
that case.  You certainly need to take care of it at some point.

I presume that you don't mean just "software interrupts" like SINT_*,
but interrupts that may have been received but masked while processing
the h/w interrupt.  Is this correct?

> This method also allows software interrupt handlers to pre-empt one
> another, according to their IPL.

It looks OK to me after some examination, but I'm still getting used to
this method of handling interrupts.  I'm more used to the m68k with
more rigid h/w interrupt levels.

-allen

-- 
 Allen Briggs                     briggs@wasabisystems.com
 http://www.wasabisystems.com/    Quality NetBSD CDs, Sales, Support, Service