]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: Avoid lock for snd_pcm_nonblock()
authorTakashi Iwai <tiwai@suse.de>
Thu, 9 Feb 2017 16:23:22 +0000 (17:23 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 9 Feb 2017 16:26:52 +0000 (17:26 +0100)
commitb5a2c06f6c5d69fc71ef648af95a044ee1dc25d0
tree79394aa7c7c8d609c4971c4732d6d69ed7d13752
parent53dc36f1f465e2a1f9ed37906a7f16a438f941e4
pcm: Avoid lock for snd_pcm_nonblock()

snd_pcm_nonblock() is called as snd_pcm_abort().  Since
snd_pcm_abort() is called often from a signal handler to clean things
up (e.g. aplay does it), we may face a deadlock if the signal is
raised during the locked operation.

There can be some way to check the deadlock state, but they would cost
much.  Since the race condition of snd_pcm_nonblock() is quite small,
let's just drop the locking inside snd_pcm_nonblock() as a
workaround.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm.c