From: <ust...@us...> - 2009-03-30 20:50:32
|
Revision: 2970 http://clucene.svn.sourceforge.net/clucene/?rev=2970&view=rev Author: ustramooner Date: 2009-03-30 20:50:22 +0000 (Mon, 30 Mar 2009) Log Message: ----------- cleanup code Modified Paths: -------------- branches/lucene2_3_2/src/core/CLucene/util/ThreadLocal.cpp Modified: branches/lucene2_3_2/src/core/CLucene/util/ThreadLocal.cpp =================================================================== --- branches/lucene2_3_2/src/core/CLucene/util/ThreadLocal.cpp 2009-03-30 20:46:36 UTC (rev 2969) +++ branches/lucene2_3_2/src/core/CLucene/util/ThreadLocal.cpp 2009-03-30 20:50:22 UTC (rev 2970) @@ -25,20 +25,13 @@ #if defined(_CL_HAVE_WIN32_THREADS) #define INIT_THREAD(ret) ret=true extern "C"{ - #ifndef _WINBASE_ - /*__declspec(dllimport) _cl_dword_t __stdcall TlsAlloc( ); - __declspec(dllimport) void* __stdcall TlsGetValue(_cl_dword_t dwTlsIndex ); - __declspec(dllimport) bool __stdcall TlsSetValue( _cl_dword_t dwTlsIndex, void* lpTlsValue ); - __declspec(dllimport) bool __stdcall TlsFree( _cl_dword_t dwTlsIndex );*/ - #define DLL_THREAD_DETACH 3 - #endif //_WINBASE_ //todo: move this to StdHeader and make it usable by other functions... bool __stdcall DllMain( unsigned short hinstDLL, // DLL module handle _cl_dword_t fdwReason, // reason called void*) // reserved { - if ( fdwReason == DLL_THREAD_DETACH ) + if ( fdwReason == 3 ) _ThreadLocal::UnregisterCurrentThread(); return true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |