On Mon, 24 Sep 2001, John Baldwin wrote:

> Hmm, that first one is in sysbeep() (the clk one)  Ah!
>         if (!beeping) {
>                 /* enable counter2 output to speaker */
>                 if (pitch) outb(IO_PPI, inb(IO_PPI) | 3);
>                 beeping = period;
>                 timeout(sysbeepstop, (void *)NULL, period);
>         }
> This is the problem code.  Hmmm.  The i386 code seems b0rked.  It doesn't have
> enough locks!  Eck.  hmm, the pc98 code doesn't even _use_ the mutex but still
> depends on disable/enable intr.  Eek.  I'll work at this later on today.

Better yet, even the i386 code doesn't even use disable/enable_intr() or
splhigh/splx()() in sysbeepstop().  However, since nothing much accesses
the PPI register, I think there is only an unimportant race between
sysbeep() and sysbeepstop().

There are some more interesting races in clock.c.  E.g., rtcin() is locked
by splhigh(), so calling it from the fast interrupt handler rtcintr() would
be invalid even if splhigh() were not a no-op.


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

Reply via email to