From: Takashi Iwai <tiwai@suse.de>
To: Mike Gorse <mgorse@mgorse.dhs.org>
Cc: alsa-devel@alsa-project.org
Subject: Re: interrupting snd_pcm_writei or snd_pcm_drain?
Date: Thu, 15 Nov 2007 12:36:07 +0100 [thread overview]
Message-ID: <s5hhcjnd9lk.wl%tiwai@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0711141223080.30648@mailserver.duxsys.com>
At Wed, 14 Nov 2007 12:34:07 -0400 (GMT+4),
Mike Gorse wrote:
>
> I've noticed that it is unsafe to call snd_pcm_writei or snd_pcm_drain in
> a pthread with its cancelation type set to asynchronous.
> snd_pcm_dmix_sync_area can lower a semaphore, and, if the thread is
> canceled while the semaphore is down, then a subsequent call to the sound
> device (calling snd_pcm_close, for instance) will also lower the semaphore
> and cause deadlock. Is this a known issue, and is there a way around it
> other than to always use deferred cancelation when calling these
> functions?
I've not looked deeply through this code flow yet, but it sounds
possible that the semaphore gets confused. Did you test any codes
indicating that?
thanks,
Takashi
prev parent reply other threads:[~2007-11-15 15:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-14 16:34 interrupting snd_pcm_writei or snd_pcm_drain? Mike Gorse
2007-11-15 11:36 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hhcjnd9lk.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=mgorse@mgorse.dhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox