Call selwakeup() from an MP-protected taskqueue.
authorSimon Schubert <corecode@dragonflybsd.org>
Sat, 5 Jan 2008 13:34:22 +0000 (13:34 +0000)
committerSimon Schubert <corecode@dragonflybsd.org>
Sat, 5 Jan 2008 13:34:22 +0000 (13:34 +0000)
commit5a5410b87d10f14ce9d6c1ae2e8093fc737d7371
treec18f700ce7f35bc742882063f4117d485aca3d55
parent308ea08882dffb49181e66586f3cf68db4ed3867
Call selwakeup() from an MP-protected taskqueue.

Before, we would call selwakeup() from interrupt context.  This
was working as long kern.intr_mpsafe == 0.  selwakeup() however needs
the MP lock held, so we can't call it directly from the interrupt
when running with kern.intr_mpsafe=1.

Instead, perform the wakeup from a "bottom half" taskqueue SWI to make the
sound devices intr_mpsafe, as they claim to be.
sys/dev/sound/pcm/buffer.c
sys/dev/sound/pcm/buffer.h
sys/dev/sound/pcm/channel.c
sys/dev/sound/pcm/sound.h