[Pixman] [PATCH] Adding TLS for Windows XP
sandmann at cs.au.dk
Tue Apr 5 10:38:53 PDT 2011
> We don't want to add another API either. It would be nice to make the library
> multi-thread safe in Windows XP and no memory leaks at the same time. One
> question regarding your suggestions of freeing the memory in DLL unload.
> TlsFree will still need to know all the TLS indices (http://msdn.microsoft.com
> /en-us/library/ms686804(v=vs.85).aspx) and Pixman core will have that
> information. So we might still need a new API.
Isn't it possible to do something similar to what is described here:
As I understand it, we only need one TLS index, which can be stored in a
global variable in a new pixman-win32.c file. That index is then used
with TlsSetValue and TlsGetValue to set and get the thread local data,
and can be released with TlsFree() when DllMain() is acalled with
Note, I don't really know the Windows API, so I might be
misunderstanding something here.
More information about the Pixman