diff options
author | Earnie Boyd <earnie@users.sf.net> | 2001-12-05 15:01:06 +0000 |
---|---|---|
committer | Earnie Boyd <earnie@users.sf.net> | 2001-12-05 15:01:06 +0000 |
commit | 98a05abd051b2ad32ba227e7b2fa4dfbc733b728 (patch) | |
tree | 6916a53c587cf1a579803782ce6ef18eef789a0b /winsup/mingw/mthr_init.c | |
parent | ff1924262ad41c8e69916eebd19c1969c7b23fdb (diff) | |
download | cygnal-98a05abd051b2ad32ba227e7b2fa4dfbc733b728.tar.gz cygnal-98a05abd051b2ad32ba227e7b2fa4dfbc733b728.tar.bz2 cygnal-98a05abd051b2ad32ba227e7b2fa4dfbc733b728.zip |
Merge MinGW CVS differences
Diffstat (limited to 'winsup/mingw/mthr_init.c')
-rw-r--r-- | winsup/mingw/mthr_init.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/winsup/mingw/mthr_init.c b/winsup/mingw/mthr_init.c index 23f7966a0..5c8c8bbe8 100644 --- a/winsup/mingw/mthr_init.c +++ b/winsup/mingw/mthr_init.c @@ -52,25 +52,29 @@ DllMain (HANDLE hDllHandle /* Library instance handle. */, { extern CRITICAL_SECTION __mingwthr_cs; - extern void __mingwthr_run_key_dtors (DWORD); + extern void __mingwthr_run_key_dtors( void ); + +#ifdef DEBUG + printf ("%s: reason %d\n", __FUNCTION__, reason ); +#endif switch (reason) { case DLL_PROCESS_ATTACH: - InitializeCriticalSection (&__mingwthr_cs); - break; + InitializeCriticalSection (&__mingwthr_cs); + break; case DLL_PROCESS_DETACH: - DeleteCriticalSection (&__mingwthr_cs); + __mingwthr_run_key_dtors(); + DeleteCriticalSection (&__mingwthr_cs); break; case DLL_THREAD_ATTACH: break; case DLL_THREAD_DETACH: - __mingwthr_run_key_dtors (GetCurrentThreadId ()); + __mingwthr_run_key_dtors(); break; } return TRUE; } - |