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

Whoops, good catch from Greg Jandl

  • Loading branch information
slouken committed Jan 19, 2011
1 parent cf7ab36 commit 8beb34620791f65fb0c05913fae214ec24b15521
Showing with 1 addition and 9 deletions.
  1. +1 −9 src/atomic/SDL_spinlock.c
@@ -24,20 +24,12 @@
#include "SDL_atomic.h"
#include "SDL_timer.h"

#if defined(__WIN32__)
#include <intrin.h>

#elif defined(__MACOSX__)
#include <libkern/OSAtomic.h>

#endif


/* This function is where all the magic happens... */
SDL_bool
SDL_AtomicTryLock(SDL_SpinLock *lock)
{
#if defined(__WIN32__)
#if defined(_MSC_VER)
SDL_COMPILE_TIME_ASSERT(locksize, sizeof(*lock) == sizeof(long));
return (_InterlockedExchange((long*)lock, 1) == 0);

0 comments on commit 8beb346

Please sign in to comment.