diff mbox

[-,THREAD_SAFE_API,1/1] pcm: Do not access lock_enabled if thread safe API

Message ID 1519922084-6954-1-git-send-email-twischer@de.adit-jv.com (mailing list archive)
State New, archived
Headers show

Commit Message

Timo Wischer March 1, 2018, 4:34 p.m. UTC
From: Timo Wischer <twischer@de.adit-jv.com>

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

Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>

Comments

Takashi Iwai March 1, 2018, 5:02 p.m. UTC | #1
On Thu, 01 Mar 2018 17:34:44 +0100,
<twischer@de.adit-jv.com> wrote:
> 
> From: Timo Wischer <twischer@de.adit-jv.com>
> 
> is not enabled.

Looks like a garbled text here.  I removed it.

> Without this commit compiling fails when THREAD_SAFE_API is not enabled
> 
> Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>

Applied with the correction of texts.  Thanks!


Takashi
diff mbox

Patch

diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
index 1be3833..d53ed98 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