Vsevolod Novikov <[email protected]> writes:

> Hi,
> 
> I would like to use the cairo library in the Airplay SDK environment 
> (www.airplaysdk.com). The SDK environment is now single-thread, so I don't 
> need to have thread-specific data (TLS option). Moreover, thread-aware code 
> in the pixman library causes compilation and/or run-time problems.
> 
> It would be useful to have a configuration option to switch using
> TLS off at all for pixman library in such environment, as it is made
> in applied patch (the similar code in the cairo library is present,
> but undocumented. I am using CAIRO_NO_MUTEX for the purpose).

It's probably reasonable to do this given that cairo has the
corresponding feature, but I'd prefer to have to #error in
pixman-compiler.h extended to say something similar to the one in
cairo: That you can defined PIXMAN_NO_TLS, but pixman won't work with
multiple threads.


Thanks,
Soren


The patch, for reference:

--- pixman-compiler.h.orig      2010-04-18 14:40:03.000000000 +0400
+++ pixman-compiler.h   2010-04-18 14:40:03.000000000 +0400
@@ -70,7 +70,14 @@
 #endif
 
 /* TLS */
-#if defined(TOOLCHAIN_SUPPORTS__THREAD)
+#if defined(PIXMAN_NO_TLS)
+
+#   define PIXMAN_DEFINE_THREAD_LOCAL(type, name)                      \
+    static type name
+#   define PIXMAN_GET_THREAD_LOCAL(name)                               \
+    (&name)
+
+#elif defined(TOOLCHAIN_SUPPORTS__THREAD)
 
 #   define PIXMAN_DEFINE_THREAD_LOCAL(type, name)                      \
     static __thread type name
_______________________________________________
Pixman mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to