diff options
author | Christopher Faylor <me@cgf.cx> | 2012-11-07 16:52:48 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-11-07 16:52:48 +0000 |
commit | 61746d6ae850aa6a89b0c0b00c609011c6d0ade9 (patch) | |
tree | 95552490c8ee6f3bf8b0f2d37e61bbc9dafe7a7b /winsup/mingw/mthr_init.c | |
parent | 2ca28ea2dc0c397b9a11072e121e1c5b6f87650b (diff) | |
download | cygnal-61746d6ae850aa6a89b0c0b00c609011c6d0ade9.tar.gz cygnal-61746d6ae850aa6a89b0c0b00c609011c6d0ade9.tar.bz2 cygnal-61746d6ae850aa6a89b0c0b00c609011c6d0ade9.zip |
* mingw: Delete obsolete directory.
* w32api: Ditto.
Diffstat (limited to 'winsup/mingw/mthr_init.c')
-rw-r--r-- | winsup/mingw/mthr_init.c | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/winsup/mingw/mthr_init.c b/winsup/mingw/mthr_init.c deleted file mode 100644 index 5c8c8bbe8..000000000 --- a/winsup/mingw/mthr_init.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * mthr_init.c - * - * Do the thread-support DLL initialization. - * - * This file is used iff the following conditions are met: - * - gcc uses -mthreads option - * - user code uses C++ exceptions - * - * The sole job of the Mingw thread support DLL (MingwThr) is to catch - * all the dying threads and clean up the data allocated in the TLSs - * for exception contexts during C++ EH. Posix threads have key dtors, - * but win32 TLS keys do not, hence the magic. Without this, there's at - * least `24 * sizeof (void*)' bytes leaks for each catch/throw in each - * thread. - * - * See mthr.c for all the magic. - * - * Created by Mumit Khan <khan@nanotech.wisc.edu> - * - */ - -#define WIN32_LEAN_AND_MEAN -#include <windows.h> -#undef WIN32_LEAN_AND_MEAN -#include <stdio.h> - -BOOL APIENTRY DllMain (HANDLE hDllHandle, DWORD reason, - LPVOID reserved /* Not used. */ ); - -/* - *---------------------------------------------------------------------- - * - * DllMain -- - * - * This routine is called by the Mingw32, Cygwin32 or VC++ C run - * time library init code, or the Borland DllEntryPoint routine. It - * is responsible for initializing various dynamically loaded - * libraries. - * - * Results: - * TRUE on sucess, FALSE on failure. - * - * Side effects: - * - *---------------------------------------------------------------------- - */ -BOOL APIENTRY -DllMain (HANDLE hDllHandle /* Library instance handle. */, - DWORD reason /* Reason this function is being called. */, - LPVOID reserved /* Not used. */) -{ - - extern CRITICAL_SECTION __mingwthr_cs; - 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; - - case DLL_PROCESS_DETACH: - __mingwthr_run_key_dtors(); - DeleteCriticalSection (&__mingwthr_cs); - break; - - case DLL_THREAD_ATTACH: - break; - - case DLL_THREAD_DETACH: - __mingwthr_run_key_dtors(); - break; - } - return TRUE; -} |