mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-18 12:29:32 +08:00
2011-08-23 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* tlsmthread.c: Update to reflect changes in tlssup.c. * tlssup.c: code clean-up.
This commit is contained in:
parent
58ef30a4e7
commit
99724a3258
@ -1,3 +1,8 @@
|
||||
2011-08-23 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
|
||||
|
||||
* tlsmthread.c: Update to reflect changes in tlssup.c.
|
||||
* tlssup.c: code clean-up.
|
||||
|
||||
2011-08-20 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
|
||||
|
||||
* include/_mingw.h: Increment version to 3.19.
|
||||
|
@ -17,43 +17,16 @@ int __mingwthr_remove_key_dtor (DWORD key);
|
||||
extern int ___w64_mingwthr_remove_key_dtor (DWORD key);
|
||||
extern int ___w64_mingwthr_add_key_dtor (DWORD key, void (*dtor)(void *));
|
||||
|
||||
|
||||
#ifndef _WIN64
|
||||
#define MINGWM10_DLL "mingwm10.dll"
|
||||
typedef int (*fMTRemoveKeyDtor)(DWORD key);
|
||||
typedef int (*fMTKeyDtor)(DWORD key, void (*dtor)(void *));
|
||||
extern fMTRemoveKeyDtor __mingw_gMTRemoveKeyDtor;
|
||||
extern fMTKeyDtor __mingw_gMTKeyDtor;
|
||||
extern int __mingw_usemthread_dll;
|
||||
#endif
|
||||
|
||||
int
|
||||
__mingwthr_remove_key_dtor (DWORD key)
|
||||
{
|
||||
#ifndef _WIN64
|
||||
if (!__mingw_usemthread_dll)
|
||||
#endif
|
||||
return ___w64_mingwthr_remove_key_dtor (key);
|
||||
#ifndef _WIN64
|
||||
if (__mingw_gMTRemoveKeyDtor)
|
||||
return (*__mingw_gMTRemoveKeyDtor) (key);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
__mingwthr_key_dtor (DWORD key, void (*dtor)(void *))
|
||||
{
|
||||
if (dtor)
|
||||
{
|
||||
#ifndef _WIN64
|
||||
if (!__mingw_usemthread_dll)
|
||||
#endif
|
||||
return ___w64_mingwthr_add_key_dtor (key, dtor);
|
||||
#ifndef _WIN64
|
||||
if (__mingw_gMTKeyDtor)
|
||||
return (*__mingw_gMTKeyDtor) (key, dtor);
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -84,7 +84,6 @@ BOOL WINAPI
|
||||
__dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
|
||||
{
|
||||
_PVFV *pfunc;
|
||||
int nfuncs, ifunc;
|
||||
|
||||
/* We don't let us trick here. */
|
||||
if (_CRT_MT != 2)
|
||||
@ -97,10 +96,8 @@ __dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
nfuncs = &__xd_z - (&__xd_a + 1);
|
||||
for (ifunc = 0; ifunc < nfuncs; ++ifunc)
|
||||
for (pfunc = &__xd_a + 1; pfunc != &__xd_z; ++pfunc)
|
||||
{
|
||||
pfunc = (&__xd_a + 1) + ifunc;
|
||||
if (*pfunc != NULL)
|
||||
(*pfunc)();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user