Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Whoops, good catch from Greg Jandl
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 19, 2011
1 parent cf7ab36 commit 8beb346
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/atomic/SDL_spinlock.c
Expand Up @@ -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);

Expand Down

0 comments on commit 8beb346

Please sign in to comment.