Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72431 - in branches/release: boost boost/thread boost/thread/win32 libs/thread libs/thread/src/pthread libs/thread/src/win32
From: anthony_at_[hidden]
Date: 2011-06-06 04:28:33


Author: anthonyw
Date: 2011-06-06 04:28:31 EDT (Mon, 06 Jun 2011)
New Revision: 72431
URL: http://svn.boost.org/trac/boost/changeset/72431

Log:
Merged thread changes from trunk
Properties modified:
   branches/release/boost/thread/ (props changed)
   branches/release/boost/thread.hpp (props changed)
   branches/release/libs/thread/ (props changed)
   branches/release/libs/thread/src/win32/thread.cpp (props changed)
Text files modified:
   branches/release/boost/thread/win32/thread_data.hpp | 6 +++---
   branches/release/libs/thread/src/pthread/once.cpp | 16 +++++++++-------
   branches/release/libs/thread/src/pthread/thread.cpp | 4 ++--
   branches/release/libs/thread/src/win32/tss_pe.cpp | 5 +++--
   4 files changed, 17 insertions(+), 14 deletions(-)

Modified: branches/release/boost/thread/win32/thread_data.hpp
==============================================================================
--- branches/release/boost/thread/win32/thread_data.hpp (original)
+++ branches/release/boost/thread/win32/thread_data.hpp 2011-06-06 04:28:31 EDT (Mon, 06 Jun 2011)
@@ -145,9 +145,9 @@
             {}
         };
 
- inline unsigned long pin_to_zero(long value)
+ inline uintmax_t pin_to_zero(intmax_t value)
         {
- return (value<0)?0u:(unsigned long)value;
+ return (value<0)?0u:(uintmax_t)value;
         }
     }
 
@@ -156,7 +156,7 @@
         void BOOST_THREAD_DECL yield();
 
         bool BOOST_THREAD_DECL interruptible_wait(detail::win32::handle handle_to_wait_for,detail::timeout target_time);
- inline void interruptible_wait(unsigned long milliseconds)
+ inline void interruptible_wait(uintmax_t milliseconds)
         {
             interruptible_wait(detail::win32::invalid_handle_value,milliseconds);
         }

Modified: branches/release/libs/thread/src/pthread/once.cpp
==============================================================================
--- branches/release/libs/thread/src/pthread/once.cpp (original)
+++ branches/release/libs/thread/src/pthread/once.cpp 2011-06-06 04:28:31 EDT (Mon, 06 Jun 2011)
@@ -22,16 +22,18 @@
             pthread_key_t epoch_tss_key;
             pthread_once_t epoch_tss_key_flag=PTHREAD_ONCE_INIT;
             
- extern "C" void delete_epoch_tss_data(void* data)
+ extern "C"
             {
- free(data);
- }
+ static void delete_epoch_tss_data(void* data)
+ {
+ free(data);
+ }
 
- extern "C" void create_epoch_tss_key()
- {
- BOOST_VERIFY(!pthread_key_create(&epoch_tss_key,delete_epoch_tss_data));
+ static void create_epoch_tss_key()
+ {
+ BOOST_VERIFY(!pthread_key_create(&epoch_tss_key,delete_epoch_tss_data));
+ }
             }
-
         }
         
         boost::uintmax_t& get_once_per_thread_epoch()

Modified: branches/release/libs/thread/src/pthread/thread.cpp
==============================================================================
--- branches/release/libs/thread/src/pthread/thread.cpp (original)
+++ branches/release/libs/thread/src/pthread/thread.cpp 2011-06-06 04:28:31 EDT (Mon, 06 Jun 2011)
@@ -50,7 +50,7 @@
 
             extern "C"
             {
- void tls_destructor(void* data)
+ static void tls_destructor(void* data)
                 {
                     boost::detail::thread_data_base* thread_info=static_cast<boost::detail::thread_data_base*>(data);
                     if(thread_info)
@@ -111,7 +111,7 @@
     {
         extern "C"
         {
- void* thread_proxy(void* param)
+ static void* thread_proxy(void* param)
             {
                 boost::detail::thread_data_ptr thread_info = static_cast<boost::detail::thread_data_base*>(param)->self;
                 thread_info->self.reset();

Modified: branches/release/libs/thread/src/win32/tss_pe.cpp
==============================================================================
--- branches/release/libs/thread/src/win32/tss_pe.cpp (original)
+++ branches/release/libs/thread/src/win32/tss_pe.cpp 2011-06-06 04:28:31 EDT (Mon, 06 Jun 2011)
@@ -11,7 +11,7 @@
 
 #if defined(BOOST_HAS_WINTHREADS) && defined(BOOST_THREAD_BUILD_LIB)
 
-#if defined(__MINGW32__) && !defined(_WIN64)
+#if (defined(__MINGW32__) && !defined(_WIN64)) || defined(__MINGW64__)
 
 #include <boost/thread/detail/tss_hooks.hpp>
 
@@ -38,7 +38,8 @@
     }
 }
 
-#if (__MINGW32_MAJOR_VERSION >3) || ((__MINGW32_MAJOR_VERSION==3) && (__MINGW32_MINOR_VERSION>=18))
+#if defined(__MINGW64__) || (__MINGW32_MAJOR_VERSION >3) || \
+ ((__MINGW32_MAJOR_VERSION==3) && (__MINGW32_MINOR_VERSION>=18))
 extern "C"
 {
     PIMAGE_TLS_CALLBACK __crt_xl_tls_callback__ __attribute__ ((section(".CRT$XLB"))) = on_tls_callback;


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