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:
Chris Sutcliffe
2010-01-25 22:58:03 +00:00
parent 8944c6af48
commit d359eb2e1f
9 changed files with 472 additions and 48 deletions

View File

@@ -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