|
Boost-Commit : |
From: anthony_at_[hidden]
Date: 2008-07-04 11:45:53
Author: anthonyw
Date: 2008-07-04 11:45:52 EDT (Fri, 04 Jul 2008)
New Revision: 47077
URL: http://svn.boost.org/trac/boost/changeset/47077
Log:
Fix for issue #2065
Text files modified:
trunk/boost/thread/win32/thread_primitives.hpp | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 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-07-04 11:45:52 EDT (Fri, 04 Jul 2008)
@@ -282,16 +282,6 @@
}
#if defined(BOOST_MSVC) && (_MSC_VER>=1400) && !defined(UNDER_CE)
-#if _MSC_VER==1400
-extern "C" unsigned char _interlockedbittestandset(long *a,long b);
-extern "C" unsigned char _interlockedbittestandreset(long *a,long b);
-#else
-extern "C" unsigned char _interlockedbittestandset(volatile long *a,long b);
-extern "C" unsigned char _interlockedbittestandreset(volatile long *a,long b);
-#endif
-
-#pragma intrinsic(_interlockedbittestandset)
-#pragma intrinsic(_interlockedbittestandreset)
namespace boost
{
@@ -299,6 +289,17 @@
{
namespace win32
{
+#if _MSC_VER==1400
+ extern "C" unsigned char _interlockedbittestandset(long *a,long b);
+ extern "C" unsigned char _interlockedbittestandreset(long *a,long b);
+#else
+ extern "C" unsigned char _interlockedbittestandset(volatile long *a,long b);
+ extern "C" unsigned char _interlockedbittestandreset(volatile long *a,long b);
+#endif
+
+#pragma intrinsic(_interlockedbittestandset)
+#pragma intrinsic(_interlockedbittestandreset)
+
inline bool interlocked_bit_test_and_set(long* x,long bit)
{
return _interlockedbittestandset(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