[Pixman] [PATCH 0/2] Thread local support on OS X

Søren Sandmann sandmann at daimi.au.dk
Tue Mar 16 09:52:14 PDT 2010


So apparently OS X does not support __thread which means current
pixman does not compile there. See this:

       http://tinderbox.x.org/builds/2010-03-16-0022/logs/pixman/#build

The following patches add some macros that expand to various types of
thread local support. On Linux, Unix, and Windows they continue to
expand to __thread and __declspec(thread), but on OS X they expand to
a set of functions that use pthread_once() and
pthread_get/setspecific() for thread local data.

I'm not particularly happy with this, but the only alternative seems
to be to just disable the fast path cache there. If anyone has better
ideas, I'm interested.

I have tested that the pthread_get/setspecific() code works on Linux,
but I don't have any way to test it on OS X. I'd appreciate if someone
can test it there. 

Of course, comments on the code are welcome too.


Thanks,
Soren



More information about the Pixman mailing list