Add support for compiling pixman without thread/tls support
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Tue, 4 May 2010 15:55:30 +0000 (11:55 -0400)
committerJeff Muizelaar <jmuizelaar@mozilla.com>
Tue, 4 May 2010 15:55:30 +0000 (11:55 -0400)
pixman/pixman-compiler.h

index 531c8c9..c410717 100644 (file)
 #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
 
 #else
 
-#    error "Unknown thread local support for this system"
+#    error "Unknown thread local support for this system. Pixman will not work with multiple threads. Define PIXMAN_NO_TLS to acknowledge and accept this limitation and compile pixman without thread-safety support."
 
 #endif