Index: thread_primitives.hpp =================================================================== --- thread_primitives.hpp (revision 76099) +++ thread_primitives.hpp (working copy) @@ -315,6 +315,7 @@ extern "C" unsigned char _interlockedbittestandreset(volatile long *a,long b); #endif +#if !defined(_M_IA64) #pragma intrinsic(_interlockedbittestandset) #pragma intrinsic(_interlockedbittestandreset) @@ -327,7 +328,17 @@ { return _interlockedbittestandreset(x,bit)!=0; } +#else + inline bool interlocked_bit_test_and_set(long* x,long bit) + { + return InterlockedBitTestAndSet(x,bit)!=0; + } + inline bool interlocked_bit_test_and_reset(long* x,long bit) + { + return InterlockedBitTestAndReset(x,bit)!=0; + } +#endif } } }