Date: Tue, 4 Jul 2006 19:57:35 GMT From: Ryan Beasley <ryanb@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 100571 for review Message-ID: <200607041957.k64JvZAW086016@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100571 Change 100571 by ryanb@ryanb_yuki on 2006/07/04 19:57:31 Add a few mtx_assert()s for extra sanity checking goodness. Affected files ... .. //depot/projects/soc2006/rbeasley_sound/sys/dev/sound/pcm/dsp.c#10 edit .. //depot/projects/soc2006/rbeasley_sound/sys/dev/sound/pcm/sound.c#8 edit Differences ... ==== //depot/projects/soc2006/rbeasley_sound/sys/dev/sound/pcm/dsp.c#10 (text+ko) ==== @@ -1356,11 +1356,14 @@ if (d == NULL) continue; + /* See the note in function docblock */ + mtx_assert(d->lock, MA_NOTOWNED); pcm_inprog(d, 1); pcm_lock(d); SLIST_FOREACH(sce, &d->channels, link) { ch = sce->channel; + mtx_assert(ch->lock, MA_NOTOWNED); CHN_LOCK(ch); if (ai->dev == -1) { if ((ch == i_dev->si_drv1) || ==== //depot/projects/soc2006/rbeasley_sound/sys/dev/sound/pcm/sound.c#8 (text+ko) ==== @@ -1171,6 +1171,8 @@ if (!d) continue; + /* See note in function's docblock */ + mtx_assert(d->lock, MA_NOTOWNED); /* Increment device's "operations in progress" */ pcm_inprog(d, 1); pcm_lock(d); @@ -1180,6 +1182,7 @@ SLIST_FOREACH(sce, &d->channels, link) { c = sce->channel; + mtx_assert(c->lock, MA_NOTOWNED); CHN_LOCK(c); if (c->flags & CHN_F_BUSY) si->openedaudio[j / intnbits] |=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607041957.k64JvZAW086016>