mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-07 13:30:07 -05:00
pcm: Do not access lock_enabled if thread safe API
Without this commit compiling fails when THREAD_SAFE_API is not enabled. Signed-off-by: Timo Wischer <twischer@de.adit-jv.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
543a9eac5d
commit
9c2fb31d0e
1 changed files with 3 additions and 0 deletions
|
|
@ -823,8 +823,11 @@ int snd_pcm_async(snd_pcm_t *pcm, int sig, pid_t pid)
|
||||||
sig = SIGIO;
|
sig = SIGIO;
|
||||||
if (pid == 0)
|
if (pid == 0)
|
||||||
pid = getpid();
|
pid = getpid();
|
||||||
|
|
||||||
|
#ifdef THREAD_SAFE_API
|
||||||
/* async handler may lead to a deadlock; suppose no multi thread */
|
/* async handler may lead to a deadlock; suppose no multi thread */
|
||||||
pcm->lock_enabled = 0;
|
pcm->lock_enabled = 0;
|
||||||
|
#endif
|
||||||
return pcm->ops->async(pcm->op_arg, sig, pid);
|
return pcm->ops->async(pcm->op_arg, sig, pid);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue