From: Brian Rhodes <bgr@acdstar.com>
To: alsa-devel@alsa-project.org
Subject: pcm write from posix threads
Date: Tue, 19 Aug 2008 17:24:06 -0500 [thread overview]
Message-ID: <48AB4806.8030002@acdstar.com> (raw)
When calling snd_pcm_write* from a thread how do you safely cancel the
thread? I've tried masking the signals which are used in alsa lib, yet
I am getting a segfault on pthread_exit(). My thread is looping doing
the following.
testcancel
snd_pcm_wait
snd_pcm_avail
snd_pcm_writei
I am checking return values to handle those functions being woken up by
pthread cancel and attempting to exit. In testing the process it
performs fine until I start actually writing data. Once I write some
data, a pthread_exit will segfault. My cancellation routine is calling
snd_pcm_drop, then doing a cancel followed by join.
next reply other threads:[~2008-08-19 22:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-19 22:24 Brian Rhodes [this message]
2008-08-20 8:11 ` pcm write from posix threads Takashi Iwai
2008-08-20 8:39 ` Brian Rhodes
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=48AB4806.8030002@acdstar.com \
--to=bgr@acdstar.com \
--cc=alsa-devel@alsa-project.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