summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Muizelaar <jmuizelaar@mozilla.com>2010-05-04 11:55:30 -0400
committerJeff Muizelaar <jmuizelaar@mozilla.com>2010-05-04 11:55:30 -0400
commit2f4f2fb4859931bf6dc5632d8c919e7296736427 (patch)
tree94bbe926e9b8da0a03f2a34577e207226ec8ee38
parent95d4026866b4655c88de75c9756e9f18881b7c29 (diff)
Add support for compiling pixman without thread/tls support
-rw-r--r--pixman/pixman-compiler.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/pixman/pixman-compiler.h b/pixman/pixman-compiler.h
index 531c8c9..c410717 100644
--- a/pixman/pixman-compiler.h
+++ b/pixman/pixman-compiler.h
@@ -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
@@ -126,6 +133,6 @@
#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