Wanted: spl()ing checkers

Chris Torek chris at umcp-cs.UUCP
Tue Oct 8 19:19:15 AEST 1985


In this particular case it is safe:  the spl6() in bflush() is to
protect bp->b_flags, since spl6() blocks disk operations (the things
that invoke biodone()), and the flags are actually all stashed away
by the time hpstrategy() is called.  The spl5() in hpstrategy() is
presumably to protect bp->b_cylin for disksort(); I am not convinced
that this is (a) required or (b) effective, but as you said it
obviously is not breaking anything.

`s = spl<k>();' should probably be rewritten as `s = raiseplto<k>();';
it is a rather rare event when the previous priority level is known
and/or the new level should be set regardless of the previous level.

Of course, the real problem is that raising an interrupt priority
level is not, after all, such a marvellous way of guaranteeing
exclusion.  It is simple, and that is an advantage, but (e.g.) it
makes for long interrupt latency in some cases, and does not work
well with multiple CPUs.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at mimsy.umd.edu



More information about the Comp.unix.wizards mailing list