Whoops, good catch from Greg Jandl
authorSam Lantinga <slouken@libsdl.org>
Tue, 18 Jan 2011 22:10:37 -0800
changeset 5028fffb33ae85e8
parent 5027 8c33dd30f6a6
child 5029 5d7d48157be7
Whoops, good catch from Greg Jandl
src/atomic/SDL_spinlock.c
     1.1 --- a/src/atomic/SDL_spinlock.c	Tue Jan 18 17:23:44 2011 -0800
     1.2 +++ b/src/atomic/SDL_spinlock.c	Tue Jan 18 22:10:37 2011 -0800
     1.3 @@ -24,20 +24,12 @@
     1.4  #include "SDL_atomic.h"
     1.5  #include "SDL_timer.h"
     1.6  
     1.7 -#if defined(__WIN32__)
     1.8 -#include <intrin.h>
     1.9 -
    1.10 -#elif defined(__MACOSX__)
    1.11 -#include <libkern/OSAtomic.h>
    1.12 -
    1.13 -#endif
    1.14 -
    1.15  
    1.16  /* This function is where all the magic happens... */
    1.17  SDL_bool
    1.18  SDL_AtomicTryLock(SDL_SpinLock *lock)
    1.19  {
    1.20 -#if defined(__WIN32__)
    1.21 +#if defined(_MSC_VER)
    1.22      SDL_COMPILE_TIME_ASSERT(locksize, sizeof(*lock) == sizeof(long));
    1.23      return (_InterlockedExchange((long*)lock, 1) == 0);
    1.24