[pulseaudio-discuss] [PATCH 0/5] A bunch of pa_mainloop_wakeup() related fixes
Tanu Kaskinen
tanuk at iki.fi
Thu Dec 13 00:55:09 PST 2012
On Thu, 2012-11-15 at 18:09 +0200, Tanu Kaskinen wrote:
> On Thu, 2012-11-15 at 18:11 +0530, Arun Raghavan wrote:
> > On 2 April 2012 17:31, Tanu Kaskinen <tanu.kaskinen at digia.com> wrote:
> > > Coverity warned about an unchecked pa_write() return value,
> > > which is fixed in the last patch of this series. While
> > > figuring out what pa_mainloop_wakeup() was supposed to do
> > > and how it was called, I noticed some other issues related
> > > to that function.
> > >
> > > There's some discussion (so far monologue only) on the
> > > mailing list:
> > > http://lists.freedesktop.org/archives/pulseaudio-discuss/2012-March/013164.html
> > > http://lists.freedesktop.org/archives/pulseaudio-discuss/2012-April/013175.html
> > >
> > > Tanu Kaskinen (5):
> > > mainloop: Change wakeup_requested type from pa_bool_t to pa_atomic_t.
> > > mainloop: Remove useless pa_mainloop_wakeup() calls.
> > > mainloop: Remove redundant wakeup_pipe validity checks.
> > > mainloop: Write to the wakeup pipe unconditionally when waking up the
> > > mainloop.
> > > mainloop: Check pa_write() return value.
> >
> > Ack on all, but could you push 1 and 4 to fix bug #56735 now and the
> > rest after 3.0?
>
> 1 and 4 pushed to master, the rest are waiting in my "next" branch.
It turned out that the "remove useless pa_mainloop_wakeup() calls" patch
was a bad idea. The wakeups are not useless. The rationale for claiming
that they are useless was that they are called from functions that are
not thread-safe. However, when using pa_threaded_mainloop, it's common
to access the underlying pa_mainloop object from multiple threads. It's
not accessed concurrently, so it's safe, but it requires calling
pa_mainloop_wakeup() in many places.
I've removed that patch from the "next" branch.
--
Tanu
More information about the pulseaudio-discuss
mailing list