From dcb6bcdd69443e229f1ead5ee4a6c2a4622890f5 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 23 Jul 2012 19:16:57 +0000 Subject: more correct variant of tls git-svn-id: http://svn.miranda-ng.org/main/trunk@1135 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_core/threads.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/mir_core/threads.cpp') 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; } -- cgit v1.2.3