[pulseaudio-commits] r1371 - in /trunk/src/pulsecore: thread-posix.c thread.h

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Mon Sep 4 15:15:17 PDT 2006


Author: lennart
Date: Tue Sep  5 00:15:15 2006
New Revision: 1371

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1371&root=pulseaudio&view=rev
Log:
add accessor functions for the userdata attached to a pa_thread object

Modified:
    trunk/src/pulsecore/thread-posix.c
    trunk/src/pulsecore/thread.h

Modified: trunk/src/pulsecore/thread-posix.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/thread-posix.c?rev=1371&root=pulseaudio&r1=1370&r2=1371&view=diff
==============================================================================
--- trunk/src/pulsecore/thread-posix.c (original)
+++ trunk/src/pulsecore/thread-posix.c Tue Sep  5 00:15:15 2006
@@ -162,6 +162,18 @@
     return t;
 }
 
+void* pa_thread_get_data(pa_thread *t) {
+    assert(t);
+
+    return t->userdata;
+}
+
+void pa_thread_set_data(pa_thread *t, void *userdata) {
+    assert(t);
+
+    t->userdata = userdata;
+}
+
 void pa_thread_yield(void) {
 #ifdef HAVE_PTHREAD_YIELD
     pthread_yield();

Modified: trunk/src/pulsecore/thread.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/thread.h?rev=1371&root=pulseaudio&r1=1370&r2=1371&view=diff
==============================================================================
--- trunk/src/pulsecore/thread.h (original)
+++ trunk/src/pulsecore/thread.h Tue Sep  5 00:15:15 2006
@@ -40,6 +40,9 @@
 void pa_thread_yield(void);
 void pa_thread_once(pa_thread_once_t *control, pa_thread_once_func_t once_func);
 
+void* pa_thread_get_data(pa_thread *t);
+void pa_thread_set_data(pa_thread *t, void *userdata);
+
 typedef struct pa_tls pa_tls;
 
 pa_tls* pa_tls_new(pa_free_cb_t free_cb);




More information about the pulseaudio-commits mailing list