2010-01-25 Kai Tietz <kai.tietz@onevision.com>
Implement TLS Callback. * tlsmcrt.c: New file. * tlsmthread.c: Ditto. * tlssup.c: Ditto. * tlsthrd.c: Ditto. * Makefile.in: Include new files. * crt1.c: Implement TLS Callback. * dllcrt1.c: Ditto. * mthr_stub.c: Remove.
This commit is contained in:
@@ -34,6 +34,9 @@ extern void _pei386_runtime_relocator (void);
|
||||
|
||||
extern int main (int, char **, char **);
|
||||
|
||||
/* TLS initialization hook. */
|
||||
extern const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback;
|
||||
|
||||
/*
|
||||
* Must have the correct app type for MSVCRT.
|
||||
*/
|
||||
@@ -186,6 +189,10 @@ __mingw_CRTStartup (void)
|
||||
{
|
||||
int nRet;
|
||||
|
||||
/* Initialize TLS callback. */
|
||||
if (__dyn_tls_init_callback != NULL)
|
||||
__dyn_tls_init_callback (NULL, DLL_THREAD_ATTACH, NULL);
|
||||
|
||||
/*
|
||||
* Set up the top-level exception handler so that signal handling
|
||||
* works as expected. The mapping between ANSI/POSIX signals and
|
||||
|
Reference in New Issue
Block a user