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:
parent
c4fe663b76
commit
06aed12790
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
|
||||||
*/
|
*/
|
||||||
#ifndef SDL_DISABLE_ATOMIC_INLINE
|
#ifndef SDL_DISABLE_ATOMIC_INLINE
|
||||||
|
|
||||||
#if defined(__WIN32__)
|
#if defined(_MSC_VER)
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
|
|
||||||
#define SDL_AtomicSet(a, v) _InterlockedExchange((long*)&(a)->value, (v))
|
#define SDL_AtomicSet(a, v) _InterlockedExchange((long*)&(a)->value, (v))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue