mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +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:
parent
0c88508a78
commit
2c69ba8741
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=93814
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user