Boost logo

Boost-Commit :

From: anthony_at_[hidden]
Date: 2008-05-23 09:16:02


Author: anthonyw
Date: 2008-05-23 09:16:01 EDT (Fri, 23 May 2008)
New Revision: 45676
URL: http://svn.boost.org/trac/boost/changeset/45676

Log:
Fixed #ifdef to actually use BTS primitives on MSVC 9
Text files modified:
   trunk/boost/thread/win32/thread_primitives.hpp | 10 +++++-----
   1 files changed, 5 insertions(+), 5 deletions(-)

Modified: trunk/boost/thread/win32/thread_primitives.hpp
==============================================================================
--- trunk/boost/thread/win32/thread_primitives.hpp (original)
+++ trunk/boost/thread/win32/thread_primitives.hpp 2008-05-23 09:16:01 EDT (Fri, 23 May 2008)
@@ -279,9 +279,9 @@
 }
 
 #if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN)
-#if MSC_VER>=1400
-extern "C" unsigned char _interlockedbittestandset(long *a,long b);
-extern "C" unsigned char _interlockedbittestandreset(long *a,long b);
+#if _MSC_VER>=1400
+extern "C" unsigned char _interlockedbittestandset(volatile long *a,long b);
+extern "C" unsigned char _interlockedbittestandreset(volatile long *a,long b);
 
 #pragma intrinsic(_interlockedbittestandset)
 #pragma intrinsic(_interlockedbittestandreset)
@@ -294,12 +294,12 @@
         {
             inline bool interlocked_bit_test_and_set(long* x,long bit)
             {
- return _interlockedbittestandset(x,bit);
+ return _interlockedbittestandset(x,bit)!=0;
             }
 
             inline bool interlocked_bit_test_and_reset(long* x,long bit)
             {
- return _interlockedbittestandreset(x,bit);
+ return _interlockedbittestandreset(x,bit)!=0;
             }
             
         }


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