On Wed, 26 Apr 2000, Greg Lehey wrote:

> Even that didn't work for me.  BTW, the fix had the side effect of
> making the clock stand still.  I've changed the code (spltty instead

The gdb code apparently assumes that the kernel debugger runs entirely
with interrupts disabled (as is required for the kernel debugger to
actually be useful for debugging interrupt handlers), or that the i/o
routines are buffered.  My version of ddb/gdb has always run with
interrupts disabled, but I never committed the changes because they
break the clock :-).

I wrote fixes to restore the clock from the RTC a couple of years ago
but have never been completely happy with them.  Restoring the clock
properly from the RTC should be part of a larger fix that restores it
properly after resuming from suspend mode, intertwined with ntp-related
code for slewing the clock instead of stepping it in some cases.

> of splhigh), and it seems to work OK now, so it probably was the tty
> interrupt stealing characters.  I'll commit when I'm sure all is still
> OK.

Neither spltty() nor splhigh() prevents sio interrupts, since sio
interrupts are fast.

spltty() primarily prevents mainly keyboard interrupts and software
interrupts.  The former could be a problem becuase the console driver
still uses polled mode for setting the keyboard LEDs (it busy-waits
for typically 2-5 msec).  The latter could be a problem if someone
has added slow timeout routines or slow netisrs or slow camisrs.  The
tty software interrupt routines haven't changed lately.

spltty() secondarily prevents network hardware interrupts if slip is
configured or ppp is attached.

Use "s = splvm(); (void)spltty();" to mask everything except clock
interrupts.  Try using splnet() to see if masking only timeouts and
netisrs fixes the problem.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to