[cairo] Problem in pthread-specific thread-local storage macros in pixman?

Tor Lillqvist tml at iki.fi
Tue Apr 6 05:42:47 PDT 2010


Look at the pthread-specific implementation of
PIXMAN_DEFINE_THREAD_LOCAL and PIXMAN_GET_THREAD_LOCAL in
pixman-compiler.h.

(For better readability, I leave out the ## operators below and just
paste in "name".)

In tls_name_get(), shouldn't the call to tls_name_alloc() pass it
tls_name_key, not key?

PIXMAN_GET_THREAD_LOCAL() passes
tls_name_key as the parameter to tls_name_get(), but the first time it
is called, tls_name_key hasn't been assigned any value yet.

Thus, the key parameter of tls_name_get() is actually not needed at all?

--tml


More information about the cairo mailing list