[pulseaudio-commits] r1821 - /branches/lennart/src/pulsecore/thread.h
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Fri Sep 14 14:05:52 PDT 2007
Author: lennart
Date: Fri Sep 14 23:05:47 2007
New Revision: 1821
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1821&root=pulseaudio&view=rev
Log:
explicitly destory TLS data before destroying TLS
Modified:
branches/lennart/src/pulsecore/thread.h
Modified: branches/lennart/src/pulsecore/thread.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/thread.h?rev=1821&root=pulseaudio&r1=1820&r2=1821&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/thread.h (original)
+++ branches/lennart/src/pulsecore/thread.h Fri Sep 14 23:05:47 2007
@@ -70,8 +70,14 @@
} \
static void name##_tls_destructor(void) PA_GCC_DESTRUCTOR; \
static void name##_tls_destructor(void) { \
- if (name##_tls.tls) \
- pa_tls_free(name##_tls.tls); \
+ if (!name##_tls.tls) \
+ return; \
+ if (free_cb) { \
+ void *p; \
+ if ((p = pa_tls_get(name##_tls.tls))) \
+ free_cb(p); \
+ } \
+ pa_tls_free(name##_tls.tls); \
} \
static inline void* name##_tls_get(void) { \
return pa_tls_get(name##_tls_obj()); \
More information about the pulseaudio-commits
mailing list