summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-04-04 20:54:27 +0000
committerjhb <jhb@FreeBSD.org>2002-04-04 20:54:27 +0000
commit5c3c6df21bc7cac65327d5cf901fa6f843de5bc6 (patch)
tree692e89e7540eab550e00d2dbc8a86b1136d8a1ef /sys
parentec0e08c9444306d8093468bc7a54703a255e8d28 (diff)
downloadFreeBSD-src-5c3c6df21bc7cac65327d5cf901fa6f843de5bc6.zip
FreeBSD-src-5c3c6df21bc7cac65327d5cf901fa6f843de5bc6.tar.gz
Change snd_mtxcreate() to accept a lock type as an extra argument that is
passed to mtx_init().
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sound/pcm/sound.c6
-rw-r--r--sys/dev/sound/pcm/sound.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index 535fe35..21b79c2 100644
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -86,7 +86,7 @@ snd_sysctl_tree_top(device_t dev)
}
void *
-snd_mtxcreate(const char *desc)
+snd_mtxcreate(const char *desc, const char *type)
{
#ifdef USING_MUTEX
struct mtx *m;
@@ -94,7 +94,7 @@ snd_mtxcreate(const char *desc)
m = malloc(sizeof(*m), M_DEVBUF, M_WAITOK | M_ZERO);
if (m == NULL)
return NULL;
- mtx_init(m, desc, MTX_RECURSE);
+ mtx_init(m, desc, type, MTX_RECURSE);
return m;
#else
return (void *)0xcafebabe;
@@ -607,7 +607,7 @@ pcm_register(device_t dev, void *devinfo, int numplay, int numrec)
return EINVAL;
}
- d->lock = snd_mtxcreate(device_get_nameunit(dev));
+ d->lock = snd_mtxcreate(device_get_nameunit(dev), "sound cdev");
snd_mtxlock(d->lock);
d->flags = 0;
diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h
index a4418f4..acc7141 100644
--- a/sys/dev/sound/pcm/sound.h
+++ b/sys/dev/sound/pcm/sound.h
@@ -244,7 +244,7 @@ void *pcm_getdevinfo(device_t dev);
int snd_setup_intr(device_t dev, struct resource *res, int flags,
driver_intr_t hand, void *param, void **cookiep);
-void *snd_mtxcreate(const char *desc);
+void *snd_mtxcreate(const char *desc, const char *type);
void snd_mtxfree(void *m);
void snd_mtxassert(void *m);
void snd_mtxlock(void *m);
OpenPOWER on IntegriCloud