1 /* 2 * mthr_stub.c 3 * 4 * Implement Mingw thread-support stubs for single-threaded C++ apps. 5 * 6 * This file is used by if gcc is built with --enable-threads=win32 and 7 * iff gcc does *NOT* use -mthreads option. 8 * 9 * The -mthreads implementation is in mthr.c. 10 * 11 * Created by Mumit Khan <khan@nanotech.wisc.edu> 12 * 13 */ 14 15 #ifndef WIN32_LEAN_AND_MEAN 16 #define WIN32_LEAN_AND_MEAN 17 #endif 18 #include <windows.h> 19 20 /* 21 * __mingwthr_register_key_dtor (DWORD key, void (*dtor) (void *)) 22 * 23 * Public interface called by C++ exception handling mechanism in 24 * libgcc (cf: __gthread_key_create). 25 * No-op versions. 26 */ 27 28 int __mingwthr_key_dtor(DWORD key,void (* dtor)(void *))29__mingwthr_key_dtor (DWORD key, void (*dtor) (void *)) 30 { 31 #ifdef DEBUG 32 printf ("%s: ignoring key: (%ld) / dtor: (%x)\n", 33 __FUNCTION__, key, dtor); 34 #endif 35 return 0; 36 } 37 38 int __mingwthr_remove_key_dtor(DWORD key)39__mingwthr_remove_key_dtor (DWORD key) 40 { 41 #ifdef DEBUG 42 printf ("%s: ignoring key: (%ld)\n", __FUNCTION__, key ); 43 #endif 44 return 0; 45 } 46