[pulseaudio-commits] r1730 - in /branches/lennart/src/pulsecore: thread-mq.c thread-mq.h

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu Aug 30 15:42:47 PDT 2007


Author: lennart
Date: Fri Aug 31 00:42:47 2007
New Revision: 1730

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1730&root=3Dpulseaudio&vi=
ew=3Drev
Log:
move queue processing code into pa_thread_mq

Modified:
    branches/lennart/src/pulsecore/thread-mq.c
    branches/lennart/src/pulsecore/thread-mq.h

Modified: branches/lennart/src/pulsecore/thread-mq.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
thread-mq.c?rev=3D1730&root=3Dpulseaudio&r1=3D1729&r2=3D1730&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/thread-mq.c (original)
+++ branches/lennart/src/pulsecore/thread-mq.c Fri Aug 31 00:42:47 2007
@@ -117,3 +117,27 @@
     return pa_tls_get(tls);
 }
 =

+int pa_thread_mq_process(pa_thread_mq *q) {
+    pa_msgobject *object;
+    int code;
+    void *data;
+    pa_memchunk chunk;
+    int64_t offset;
+
+    pa_assert(q);
+
+    if (pa_asyncmsgq_get(q->inq, &object, &code, &data, &offset, &chunk, 0=
) =3D=3D 0) {
+        int ret;
+        =

+        if (!object && code =3D=3D PA_MESSAGE_SHUTDOWN) {
+            pa_asyncmsgq_done(q->inq, 0);
+            return -1;
+        }
+
+        ret =3D pa_asyncmsgq_dispatch(object, code, data, offset, &chunk);
+        pa_asyncmsgq_done(q->inq, ret);
+        return 1;
+    } =

+
+    return 0;
+}

Modified: branches/lennart/src/pulsecore/thread-mq.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
thread-mq.h?rev=3D1730&root=3Dpulseaudio&r1=3D1729&r2=3D1730&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/thread-mq.h (original)
+++ branches/lennart/src/pulsecore/thread-mq.h Fri Aug 31 00:42:47 2007
@@ -43,6 +43,9 @@
 /* Install the specified pa_thread_mq object for the current thread */
 void pa_thread_mq_install(pa_thread_mq *q);
 =

+/* Dispatched queued events on the thread side. */
+int pa_thread_mq_process(pa_thread_mq *q);
+
 /* Return the pa_thread_mq object that is set for the current thread */
 pa_thread_mq *pa_thread_mq_get(void);
 =





More information about the pulseaudio-commits mailing list