src/atomic/SDL_spinlock.c
changeset 5090 327f181542f1
parent 5086 c2539ff054c8
child 5091 2164a79b5ca9
     1.1 --- a/src/atomic/SDL_spinlock.c	Mon Jan 24 17:47:18 2011 -0800
     1.2 +++ b/src/atomic/SDL_spinlock.c	Mon Jan 24 21:20:30 2011 -0800
     1.3 @@ -25,14 +25,7 @@
     1.4  #include "SDL_timer.h"
     1.5  
     1.6  /* Don't do the check for Visual Studio 2005, it's safe here */
     1.7 -#if defined(_MSC_VER)
     1.8 -#ifdef _WIN32_WCE
     1.9 -#define WIN32_LEAN_AND_MEAN
    1.10 -#include <windows.h>
    1.11 -#else
    1.12 -#include <intrin.h>
    1.13 -#endif
    1.14 -#endif /* _MSC_VER */
    1.15 +#include "../core/windows/SDL_windows.h"
    1.16  
    1.17  /* This function is where all the magic happens... */
    1.18  SDL_bool
    1.19 @@ -40,7 +33,7 @@
    1.20  {
    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 +    return (InterlockedExchange((long*)lock, 1) == 0);
    1.25  
    1.26  #elif defined(__MACOSX__)
    1.27      return OSAtomicCompareAndSwap32Barrier(0, 1, lock);