1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Change snd_mtxcreate() to accept a lock type as an extra argument that is

passed to mtx_init().
This commit is contained in:
John Baldwin 2002-04-04 20:54:27 +00:00
parent 0c88508a78
commit 2c69ba8741
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=93814
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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);