From: Paul Davis <paul@linuxaudiosystems.com>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Q: is the ALSA-lib API thread-safe
Date: Thu, 05 Aug 2004 08:31:30 -0400 [thread overview]
Message-ID: <200408051231.i75CVUt8027083@localhost.localdomain> (raw)
In-Reply-To: Your message of "Thu, 05 Aug 2004 12:06:55 +0200." <Pine.HPX.4.33n.0408051203210.18069-100000@studcom.urz.uni-halle.de>
>Daniel Schnell wrote:
>> is the ALSA-Lib-API thread-safe concerning the following scenario:
>>
>> in thread 1 the audio-processing takes place via snd_pcm_avail_update(),
>> snd_pcm_begin(), snd_pcm_commit(). In thread 2 I call the functions:
>> snd_pcm_hwsync(), snd_pcm_avail_update() to get the actual delay via
>> bufferframes - snd_pcm_avail_update().
>
>The snd_pcm_t* handle which you're using in both threads refers to one
>data structure in alsa-lib which isn't protected against concurrent
>accesses.
how true. its a bit ironic that one of the big advances of ALSA's
kernel code over OSS is the addition of thread safety, and that
another is the use of a user-space library to mediate access. the
combination of the two, however, eliminates thread safety :(
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
next prev parent reply other threads:[~2004-08-05 12:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-05 7:57 Q: is the ALSA-lib API thread-safe Daniel Schnell
2004-08-05 10:06 ` Clemens Ladisch
2004-08-05 12:31 ` Paul Davis [this message]
2004-08-05 12:51 ` Jaroslav Kysela
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=200408051231.i75CVUt8027083@localhost.localdomain \
--to=paul@linuxaudiosystems.com \
--cc=alsa-devel@lists.sourceforge.net \
--cc=clemens@ladisch.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.