OSDN Git Service

2009-07-18 Gregory McGarry <gregorymcgarry@users.sourceforge.net>
[pf3gnuchains/pf3gnuchains4x.git] / winsup / mingw / mthr_stub.c
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 #define WIN32_LEAN_AND_MEAN
16 #include <windows.h>
17 #undef WIN32_LEAN_AND_MEAN
18
19 /*
20  * __mingwthr_register_key_dtor (DWORD key, void (*dtor) (void *))
21  *
22  * Public interface called by C++ exception handling mechanism in
23  * libgcc (cf: __gthread_key_create).
24  * No-op versions.
25  */
26
27 int
28 __mingwthr_key_dtor (DWORD key, void (*dtor) (void *))
29 {
30 #ifdef DEBUG
31   printf ("%s: ignoring key: (%ld) / dtor: (%x)\n", 
32           __FUNCTION__, key, dtor);
33 #endif
34   return 0;
35 }
36
37 int
38 __mingwthr_remove_key_dtor (DWORD key )
39 {
40 #ifdef DEBUG
41   printf ("%s: ignoring key: (%ld)\n", __FUNCTION__, key );
42 #endif
43   return 0;
44 }