Skip to contentSkip to conversation

pcm: Do not access lock_enabled if thread safe API

PATCH In review [email protected] 2 participants 2 messages Mar 1, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pcm: Do not access lock_enabled if thread safe API

From: Timo Wischer <[email protected]>

is not enabled.
Without this commit compiling fails when THREAD_SAFE_API is not enabled

src/pcm/pcm.c +3 -0
index 1be3833..d53ed98 100644
@@ -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
Signature · 1 line
2.7.4