diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-23 19:16:57 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-23 19:16:57 +0000 |
commit | dcb6bcdd69443e229f1ead5ee4a6c2a4622890f5 (patch) | |
tree | 295ec22cdd4e216087c29d6fbab6ba8921f007b0 /src/mir_core/threads.cpp | |
parent | 5c794a21c8e0c943e69b08a9ba52064149d663a6 (diff) |
more correct variant of tls
git-svn-id: http://svn.miranda-ng.org/main/trunk@1135 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core/threads.cpp')
-rw-r--r-- | src/mir_core/threads.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/mir_core/threads.cpp b/src/mir_core/threads.cpp index cf1cdad48c..9187dfdf7c 100644 --- a/src/mir_core/threads.cpp +++ b/src/mir_core/threads.cpp @@ -103,9 +103,6 @@ struct FORK_ARG { void __cdecl forkthread_r(void * arg)
{
- MThreadData threadData = { CreateEvent(NULL, FALSE, FALSE, NULL) };
- TlsSetValue(mir_tls, &threadData);
-
struct FORK_ARG * fa = (struct FORK_ARG *) arg;
void (*callercode)(void*)=fa->threadcode;
void * cookie=fa->arg;
@@ -121,7 +118,6 @@ void __cdecl forkthread_r(void * arg) SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
Thread_Pop();
- CloseHandle(threadData.m_hEvent);
}
MIR_CORE_DLL(UINT_PTR) forkthread( void (__cdecl *threadcode)(void*), unsigned long stacksize, void *arg)
@@ -144,9 +140,6 @@ MIR_CORE_DLL(UINT_PTR) forkthread( void (__cdecl *threadcode)(void*), unsigned l unsigned __stdcall forkthreadex_r(void * arg)
{
- MThreadData threadData = { CreateEvent(NULL, FALSE, FALSE, NULL) };
- TlsSetValue(mir_tls, &threadData);
-
struct FORK_ARG *fa = (struct FORK_ARG *)arg;
pThreadFuncEx threadcode = fa->threadcodeex;
pThreadFuncOwner threadcodeex = (pThreadFuncOwner)fa->threadcodeex;
@@ -169,7 +162,6 @@ unsigned __stdcall forkthreadex_r(void * arg) SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
Thread_Pop();
- CloseHandle(threadData.m_hEvent);
return rc;
}
|