This is the mail archive of the pthreads-win32@sources.redhat.com mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem using PThreads TLS from a DLL.


Hello all,

I've encountered a problem when using the PThreads-Win32 (PThreadVCE) thread local storage (TLS) routines from within my own DLL.  Before I dig any deeper I would like to know if anyone has seen this and/or has a workaround.  My DLL is calloc'ing TLS data and I believe the TLS destructors (which I have calling free) are firing within the main app and not within my DLL.  This causes the app that uses my DLL to crash in the TLS destructor when calling free.  It crashes beacuse the app is trying to free CRT memory allocated by my DLL.   Is there some PThread function that I can call in my DLLMain to cause the TLS destructors to fire when my DLL is detached?

Thanks,
Aurelio Medina


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]