please test pcm channel patch
Mathew Kanner
mat at cnd.mcgill.ca
Wed Dec 3 09:00:07 PST 2003
On Dec 03, Sean Chittenden wrote:
> > > Hello All,
> > > Please test this PCM patch. It creates seperate locking
> > > classes for PCM channels and should prevent the warning where
> > > multiple mutexes from the same class are held (as reported
> > > recently). I believe this to be a good strategy as it masks fewer
> > > errors.
> >
> > I can confirm that this patch fixes my LOR for pcm(4). -sc
>
> Bah! I got 30min into playing tunes and picked the same LOR up not
> more than 5min after sending this. :( Sorry for the false alarm.
>
> acquiring duplicate lock of same type: "pcm record channel"
> 1st pcm0:record:0 @ /usr/src/sys/dev/sound/pcm/dsp.c:144
> 2nd pcm0:play:0 @ /usr/src/sys/dev/sound/pcm/dsp.c:146
> Stack backtrace:
Sean,
I found the mistake, I assumed that a variable was initialized
when it wasn't. Sorry for asking you to test a stupid patch before.
Please try this one.
Thanks again,
--Mat
--
Having your book made into a movie is like having your ox
made into a bouillon cube.
- Bill Neely
-------------- next part --------------
Index: channel.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/sound/pcm/channel.c,v
retrieving revision 1.92
diff -u -r1.92 channel.c
--- channel.c 27 Nov 2003 19:51:44 -0000 1.92
+++ channel.c 3 Dec 2003 16:55:41 -0000
@@ -67,9 +67,12 @@
static int chn_buildfeeder(struct pcm_channel *c);
static void
-chn_lockinit(struct pcm_channel *c)
+chn_lockinit(struct pcm_channel *c, int dir)
{
- c->lock = snd_mtxcreate(c->name, "pcm channel");
+ if (dir == PCMDIR_PLAY)
+ c->lock = snd_mtxcreate(c->name, "pcm play channel");
+ else
+ c->lock = snd_mtxcreate(c->name, "pcm record channel");
}
static void
@@ -736,7 +739,7 @@
struct snd_dbuf *b, *bs;
int ret;
- chn_lockinit(c);
+ chn_lockinit(c, dir);
b = NULL;
bs = NULL;
More information about the freebsd-current
mailing list