Update of /cvsroot/boost/boost/libs/thread/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15355
Modified Files:
Tag: RC_1_34_0
tss.cpp
Log Message:
Fix for ticket #906
Index: tss.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/thread/src/tss.cpp,v
retrieving revision 1.16.10.4
retrieving revision 1.16.10.5
diff -u -d -r1.16.10.4 -r1.16.10.5
--- tss.cpp 1 Oct 2006 12:57:18 -0000 1.16.10.4
+++ tss.cpp 22 May 2007 15:38:58 -0000 1.16.10.5
@@ -31,7 +31,7 @@
boost::mutex* tss_data_mutex = 0;
tss_data_cleanup_handlers_type* tss_data_cleanup_handlers = 0;
#if defined(BOOST_HAS_WINTHREADS)
- DWORD tss_data_native_key;
+ DWORD tss_data_native_key=TLS_OUT_OF_INDEXES;
#elif defined(BOOST_HAS_PTHREADS)
pthread_key_t tss_data_native_key;
#elif defined(BOOST_HAS_MPTASKS)
@@ -60,6 +60,7 @@
tss_data_mutex = 0;
#if defined(BOOST_HAS_WINTHREADS)
TlsFree(tss_data_native_key);
+ tss_data_native_key=TLS_OUT_OF_INDEXES;
#elif defined(BOOST_HAS_PTHREADS)
pthread_key_delete(tss_data_native_key);
#elif defined(BOOST_HAS_MPTASKS)
@@ -78,6 +79,9 @@
(*(*tss_data_cleanup_handlers)[i])((*slots)[i]);
(*slots)[i] = 0;
}
+#if defined(BOOST_HAS_WINTHREADS)
+ TlsSetValue(tss_data_native_key,0);
+#endif
tss_data_dec_use(lock);
delete slots;
}
@@ -97,7 +101,7 @@
//Allocate tls slot
tss_data_native_key = TlsAlloc();
- if (tss_data_native_key == 0xFFFFFFFF)
+ if (tss_data_native_key == TLS_OUT_OF_INDEXES)
return;
#elif defined(BOOST_HAS_PTHREADS)
int res = pthread_key_create(&tss_data_native_key, &cleanup_slots);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs