[CRT]
[reactos.git] / reactos / lib / 3rdparty / mingw / mingwthrd_nomt.c
1 #ifndef WIN32_LEAN_AND_MEAN
2 #define WIN32_LEAN_AND_MEAN
3 #endif
4 #include <windows.h>
5 #include <stdlib.h>
6
7 /* We support TLS cleanup code in any case. If shared version of libgcc is used _CRT_MT has value 1, otherwise
8 we do tls cleanup in runtime and _CRT_MT has value 2. */
9 int _CRT_MT = 2;
10
11 int __mingwthr_key_dtor (DWORD key, void (*dtor)(void *));
12 int __mingwthr_remove_key_dtor (DWORD key);
13
14 extern int ___w64_mingwthr_remove_key_dtor (DWORD key);
15 extern int ___w64_mingwthr_add_key_dtor (DWORD key, void (*dtor)(void *));
16
17 int
18 __mingwthr_remove_key_dtor (DWORD key)
19 {
20 return ___w64_mingwthr_remove_key_dtor (key);
21 }
22
23 int
24 __mingwthr_key_dtor (DWORD key, void (*dtor)(void *))
25 {
26 if (dtor)
27 return ___w64_mingwthr_add_key_dtor (key, dtor);
28
29 return 0;
30 }