From 6d4039cc85663ade1aa6a513a46178e97eaa3527 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Sun, 18 Jan 2015 13:08:47 +0100 Subject: [PATCH] More fix for windows (extend previous commit) --- common/src/Utilities/ThreadTools.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/Utilities/ThreadTools.cpp b/common/src/Utilities/ThreadTools.cpp index 0cb6f05821..9ffde2675d 100644 --- a/common/src/Utilities/ThreadTools.cpp +++ b/common/src/Utilities/ThreadTools.cpp @@ -291,7 +291,7 @@ bool Threading::pxThread::Detach() { AffinityAssert_DisallowFromSelf(pxDiagSpot); - if( _InterlockedExchange( &m_detached, true ) ) return false; + if( Threading::AtomicExchange( m_detached, true ) ) return false; pthread_detach( m_thread ); return true; } @@ -850,7 +850,7 @@ __fi void* Threading::_AtomicCompareExchangePointer(volatile uptr& target, uptr #ifdef _M_X86_64 // high-level atomic ops, please leave these 64 bit checks in place. return (void*)_InterlockedCompareExchange64((volatile s64*)&target, value, comparand); #else - return (void*)_InterlockedCompareExchange((volatile s32*)&target, value, comparand); + return (void*)_InterlockedCompareExchange((volatile vol_t*)&target, value, comparand); #endif }