Fixes for pthread thread local storage.
authorSøren Sandmann Pedersen <ssp@redhat.com>
Wed, 7 Apr 2010 05:44:12 +0000 (01:44 -0400)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Wed, 14 Apr 2010 02:41:48 +0000 (22:41 -0400)
commit714559dccda3165a72f0a9935c1edc3aef535f30
treef06d5fca23024412708975c190b8fe8a499b593d
parent634ba33b5b1fcfd5a0e7910f9991b4ed4f674549
Fixes for pthread thread local storage.

The tls_name_key variable is passed to tls_name_get(), and the first
time this happens it isn't initialized. tls_name_get() then passes it
on to tls_name_alloc() which passes it on to pthread_setspecific()
leading to undefined behavior.

None of this is actually necessary at all because there is only one
such variable per thread local variable, so it doesn't need to passed
as a parameter at all.

All of this was pointed out by Tor Lillqvist on the cairo mailing
list.
pixman/pixman-compiler.h