Add PIXMAN_DEFINE_THREAD_LOCAL() and PIXMAN_GET_THREAD_LOCAL() macros
authorSøren Sandmann Pedersen <ssp@redhat.com>
Tue, 16 Mar 2010 16:23:50 +0000 (12:23 -0400)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Tue, 16 Mar 2010 18:58:12 +0000 (14:58 -0400)
commit7c9f121efe7ee6afafad8b294974f5498054559b
treef87d863242a83d1b519ab113ac76aa21ede2f710
parent6b9c54820015f69e667ed54441e83042c9a84cc1
Add PIXMAN_DEFINE_THREAD_LOCAL() and PIXMAN_GET_THREAD_LOCAL() macros

These macros hide the various types of thread local support. On Linux
and Unix, they expand to just __thread. On Microsoft Visual C++, they
expand to __declspec(thread).

On OS X and other systems that don't have __thread, they expand to a
complicated concoction that uses pthread_once() and
pthread_get/set_specific() to get thread local variables.
pixman/pixman-compiler.h
pixman/pixman.c