|
Boost-Commit : |
From: anthony_at_[hidden]
Date: 2007-11-19 07:17:32
Author: anthonyw
Date: 2007-11-19 07:17:31 EST (Mon, 19 Nov 2007)
New Revision: 41222
URL: http://svn.boost.org/trac/boost/changeset/41222
Log:
fixed TSS cleanup on 64-bit Windows
Text files modified:
trunk/libs/thread/src/win32/tss_pe.cpp | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
Modified: trunk/libs/thread/src/win32/tss_pe.cpp
==============================================================================
--- trunk/libs/thread/src/win32/tss_pe.cpp (original)
+++ trunk/libs/thread/src/win32/tss_pe.cpp 2007-11-19 07:17:31 EST (Mon, 19 Nov 2007)
@@ -120,6 +120,16 @@
//The .CRT$Xxx information is taken from Codeguru:
//http://www.codeguru.com/Cpp/misc/misc/threadsprocesses/article.php/c6945__2/
+#if (_MSC_VER >= 1400)
+#pragma section(".CRT$XIU",long,read)
+#pragma section(".CRT$XCU",long,read)
+#pragma section(".CRT$XTU",long,read)
+#pragma section(".CRT$XLC",long,read)
+ static __declspec(allocate(".CRT$XLC")) _TLSCB __xl_ca=on_tls_callback;
+ static __declspec(allocate(".CRT$XIU"))_PVFV p_tls_prepare = on_tls_prepare;
+ static __declspec(allocate(".CRT$XCU"))_PVFV p_process_init = on_process_init;
+ static __declspec(allocate(".CRT$XTU"))_PVFV p_process_term = on_process_term;
+#else
#if (_MSC_VER >= 1300) // 1300 == VC++ 7.0
# pragma data_seg(push, old_seg)
#endif
@@ -144,7 +154,6 @@
#pragma data_seg(".CRT$XLB")
_TLSCB p_thread_callback = on_tls_callback;
#pragma data_seg()
-
//Callback for termination.
#pragma data_seg(".CRT$XTU")
@@ -153,6 +162,7 @@
#if (_MSC_VER >= 1300) // 1300 == VC++ 7.0
# pragma data_seg(pop, old_seg)
#endif
+#endif
PVAPI on_tls_prepare(void)
{
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk