Subject: Re: IPL-lowering functions should return 'void', and now they do.
To: Ben Harris <bjh21@netbsd.org>
From: Greywolf <greywolf@starwolf.com>
List: tech-kern
Date: 06/08/2000 10:52:37
On Thu, 8 Jun 2000, Ben Harris wrote:

# Erm, the point is that anyone trying to lower the spl should be doing it
# permanently, and hence shouldn't need to know the old one.  Anyone who
# needs to know what the spl was is probably doing the wrong thing.

Why so?  I thought the accepted and widely practised method for fiddling
with spls in drivers was to:


	ospl = splintr();	/* or splx(x) */
	/* do other stuff */
	splx(ospl);

Is there a case where they might want to RAISE the spl?  [I agree it
seems weird/wrong; but I'm not a kernel hacker and know but a bare bit of
what spl*() are for; consider it self-edification, I guess, but the
"you don't need to know this" always raises a red flag with me.]

# Also, it takes some effort for a function to return int rather than void,
# so making the spl-lowering functions return void should make them slightly
# faster.

Is there a global reference to the current spl?  If so, then spl*() could
be made (void) without too much difficulty...

				--*greywolf;
--
BSD: Perpetual performance!