Not all MinGW compilers have intrin.h, so we'll only use this with Visual Studio.

That's actually okay, since gcc has the builtin atomic intrinsics. :)
This commit is contained in:
Sam Lantinga 2011-01-18 15:07:53 -08:00
parent c4fe663b76
commit 06aed12790

View File

@ -112,7 +112,7 @@ extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
*/
#ifndef SDL_DISABLE_ATOMIC_INLINE
#if defined(__WIN32__)
#if defined(_MSC_VER)
#include <intrin.h>
#define SDL_AtomicSet(a, v) _InterlockedExchange((long*)&(a)->value, (v))