Question about spl() levels in clock.c
WilliamsonK
khw at druil.UUCP
Tue Jul 16 08:20:32 AEST 1985
In clock.c in several versions of UN*X the code checks
to see if the spl level was non-zero before
the clock interrupt (i.e. we were already in an
interrupt or a kernel critical section).
If so it doesn't bother with the callout processing.
My question is this: At the beginning of the callout
processing it lowers the spl level so that the
clock interrupt can be interrupted. But it doesn't
raise the interrupt level at the end of the callout
processing where the branches rejoin (at the label
"out:").
This means that after "out:" is reached there are two
possible spl levels: the original clock interrupt
level, and the level set before doing the callout.
If it is important that the code after "out:"
not be interruptible, then the spl() level should
be raised again for the case where it is lowered.
If it is not important, then general principals
about not keeping interrupts masked longer than
absolutely necessary should dictate that the
spl() level be lowered always after "out:".
Is this an oversight on the part of the Un*x
developers, or what am I missing?
Karl Williamson
ATT ISL Denver
ihnp4!drutx!druil!khw
303-538-4583
More information about the Comp.unix.wizards
mailing list