[Gc] Win32: DLLs and thread registration
gn at fluidon.dyndns.info
Wed Feb 6 04:15:20 PST 2008
I have compiled the collector (current CVS version 7.1.3) as a DLL with
Visual Studio 2008 Express Edition. I've configured the collector to
use DllMain registration (GC_DLL defined).
I'm confused by a number of things:
1. GC_CreateThread is mapped back to the original
Windows API version by the exports definitions
file gc.def. Why that? GC_CreateThread thus
2. The DLL does not export GC_register_my_thread,
which makes it hard for applications to register
their threads manually. Probably GC_API has been
forgotten in the declaration?
3. DllMain tests for parallel_initialized==true
when called during DLL_THREAD_DETACH.
parallel_initialized, however, is always false
unless GC_CreateThread (or equivalent) is called.
DLL_THREAD_ATTACH neither calls any of them nor
registers the newly attached thread since that
only happens, when parallel_initialized is true.
Can somebody shed some light on these issues?
More information about the Gc