From: Timo Wischer Date: Thu, 1 Mar 2018 16:34:44 +0000 (+0100) Subject: pcm: Do not access lock_enabled if thread safe API X-Git-Tag: v1.1.6~12 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=9c2fb31d0ec13692eeefe1013b1f031da0e71395;p=alsa-lib.git 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 Signed-off-by: Takashi Iwai --- diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c index 1be38339..d53ed986 100644 --- a/src/pcm/pcm.c +++ b/src/pcm/pcm.c @@ -823,8 +823,11 @@ int snd_pcm_async(snd_pcm_t *pcm, int sig, pid_t pid) sig = SIGIO; if (pid == 0) pid = getpid(); + +#ifdef THREAD_SAFE_API /* async handler may lead to a deadlock; suppose no multi thread */ pcm->lock_enabled = 0; +#endif return pcm->ops->async(pcm->op_arg, sig, pid); } #endif