[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, stable-queue, updated. v0.9.21-9-g73ae1fc

Lennart Poettering gitmailer-noreply at 0pointer.de
Tue Jan 12 14:02:50 PST 2010


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The stable-queue branch has been updated
      from  78811c5653d0ba508b6558ba4578b61da26c60cf (commit)

- Log -----------------------------------------------------------------
73ae1fc once: make once related variables volatile
15a3018 udev: don't forget to unref devices we are not interested in
-----------------------------------------------------------------------

Summary of changes:
 src/modules/module-udev-detect.c |    4 +++-
 src/pulsecore/flist.h            |    2 +-
 src/pulsecore/once.c             |    3 +--
 src/pulsecore/thread-posix.c     |    8 ++------
 src/pulsecore/thread.h           |    2 +-
 5 files changed, 8 insertions(+), 11 deletions(-)

-----------------------------------------------------------------------

commit 15a3018bda8ee92393671ceaf272be418e95a81f
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jan 12 23:01:24 2010 +0100

    udev: don't forget to unref devices we are not interested in
    
    https://bugzilla.redhat.com/show_bug.cgi?id=552932

diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c
index 1b1e9c1..7508d9a 100644
--- a/src/modules/module-udev-detect.c
+++ b/src/modules/module-udev-detect.c
@@ -416,8 +416,10 @@ static void monitor_cb(
         goto fail;
     }
 
-    if (!path_get_card_id(udev_device_get_devpath(dev)))
+    if (!path_get_card_id(udev_device_get_devpath(dev))) {
+        udev_device_unref(dev);
         return;
+    }
 
     process_device(u, dev);
     udev_device_unref(dev);

commit 73ae1fce001253677b7ab633f42d3c3300fe5cf5
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jan 12 23:03:04 2010 +0100

    once: make once related variables volatile

diff --git a/src/pulsecore/flist.h b/src/pulsecore/flist.h
index e147486..184e599 100644
--- a/src/pulsecore/flist.h
+++ b/src/pulsecore/flist.h
@@ -45,7 +45,7 @@ void* pa_flist_pop(pa_flist*l);
 
 #define PA_STATIC_FLIST_DECLARE(name, size, free_cb)                    \
     static struct {                                                     \
-        pa_flist *flist;                                                \
+        pa_flist *volatile flist;                                       \
         pa_once once;                                                   \
     } name##_flist = { NULL, PA_ONCE_INIT };                            \
     static void name##_flist_init(void) {                               \
diff --git a/src/pulsecore/once.c b/src/pulsecore/once.c
index 05a3ad2..4e509e0 100644
--- a/src/pulsecore/once.c
+++ b/src/pulsecore/once.c
@@ -29,8 +29,6 @@
 #include "once.h"
 
 pa_bool_t pa_once_begin(pa_once *control) {
-    pa_mutex *m;
-
     pa_assert(control);
 
     if (pa_atomic_load(&control->done))
@@ -43,6 +41,7 @@ pa_bool_t pa_once_begin(pa_once *control) {
      * executed by us. Hence the awkward locking. */
 
     for (;;) {
+        pa_mutex *m;
 
         if ((m = pa_atomic_ptr_load(&control->mutex))) {
 
diff --git a/src/pulsecore/thread-posix.c b/src/pulsecore/thread-posix.c
index fdab270..bc0d6e3 100644
--- a/src/pulsecore/thread-posix.c
+++ b/src/pulsecore/thread-posix.c
@@ -80,11 +80,9 @@ pa_thread* pa_thread_new(pa_thread_func_t thread_func, void *userdata) {
 
     pa_assert(thread_func);
 
-    t = pa_xnew(pa_thread, 1);
+    t = pa_xnew0(pa_thread, 1);
     t->thread_func = thread_func;
     t->userdata = userdata;
-    t->joined = FALSE;
-    pa_atomic_store(&t->running, 0);
 
     if (pthread_create(&t->id, NULL, internal_thread_func, t) < 0) {
         pa_xfree(t);
@@ -135,10 +133,8 @@ pa_thread* pa_thread_self(void) {
     /* This is a foreign thread, let's create a pthread structure to
      * make sure that we can always return a sensible pointer */
 
-    t = pa_xnew(pa_thread, 1);
+    t = pa_xnew0(pa_thread, 1);
     t->id = pthread_self();
-    t->thread_func = NULL;
-    t->userdata = NULL;
     t->joined = TRUE;
     pa_atomic_store(&t->running, 2);
 
diff --git a/src/pulsecore/thread.h b/src/pulsecore/thread.h
index 25eace6..60c1267 100644
--- a/src/pulsecore/thread.h
+++ b/src/pulsecore/thread.h
@@ -55,7 +55,7 @@ void *pa_tls_set(pa_tls *t, void *userdata);
 #define PA_STATIC_TLS_DECLARE(name, free_cb)                            \
     static struct {                                                     \
         pa_once once;                                                   \
-        pa_tls *tls;                                                    \
+        pa_tls *volatile tls;                                           \
     } name##_tls = {                                                    \
         .once = PA_ONCE_INIT,                                           \
         .tls = NULL                                                     \

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list