Boost logo

Boost-Commit :

From: anthony_at_[hidden]
Date: 2007-10-05 06:41:19


Author: anthonyw
Date: 2007-10-05 06:41:16 EDT (Fri, 05 Oct 2007)
New Revision: 39700
URL: http://svn.boost.org/trac/boost/changeset/39700

Log:
declared _ReadWriteBarrier intrinsic; added explicit check for zero to ReleaseSemaphore call
Text files modified:
   branches/thread_rewrite/boost/boost/thread/win32/interlocked_read.hpp | 3 +++
   branches/thread_rewrite/boost/boost/thread/win32/thread_primitives.hpp | 2 +-
   2 files changed, 4 insertions(+), 1 deletions(-)

Modified: branches/thread_rewrite/boost/boost/thread/win32/interlocked_read.hpp
==============================================================================
--- branches/thread_rewrite/boost/boost/thread/win32/interlocked_read.hpp (original)
+++ branches/thread_rewrite/boost/boost/thread/win32/interlocked_read.hpp 2007-10-05 06:41:16 EDT (Fri, 05 Oct 2007)
@@ -11,6 +11,9 @@
 
 #include <boost/detail/interlocked.hpp>
 
+extern "C" void _ReadWriteBarrier(void);
+#pragma intrinsic(_ReadWriteBarrier)
+
 namespace boost
 {
     namespace detail

Modified: branches/thread_rewrite/boost/boost/thread/win32/thread_primitives.hpp
==============================================================================
--- branches/thread_rewrite/boost/boost/thread/win32/thread_primitives.hpp (original)
+++ branches/thread_rewrite/boost/boost/thread/win32/thread_primitives.hpp 2007-10-05 06:41:16 EDT (Fri, 05 Oct 2007)
@@ -133,7 +133,7 @@
 
             inline void release_semaphore(handle semaphore,long count)
             {
- bool const success=ReleaseSemaphore(semaphore,count,0);
+ bool const success=ReleaseSemaphore(semaphore,count,0)!=0;
                 BOOST_ASSERT(success);
             }
 


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