Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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

…sual Studio.

That's actually okay, since gcc has the builtin atomic intrinsics. :)
  • Loading branch information
slouken committed Jan 18, 2011
1 parent 16a928d commit 4f5653ff63a62356d39586fd97f4a3d6c0eb6c7c
Showing with 1 addition and 1 deletion.
  1. +1 −1 include/SDL_atomic.h
@@ -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))

0 comments on commit 4f5653f

Please sign in to comment.