Let iOS use OSAtomicCompareAndSwap32Barrier() if nothing else is available.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 16 Oct 2011 03:02:46 -0400
changeset 5998e9b9ef14aef4
parent 5997 69875bbf83d8
child 5999 0e3fd8178e1d
Let iOS use OSAtomicCompareAndSwap32Barrier() if nothing else is available.
src/atomic/SDL_spinlock.c
     1.1 --- a/src/atomic/SDL_spinlock.c	Fri Oct 14 20:47:53 2011 -0400
     1.2 +++ b/src/atomic/SDL_spinlock.c	Sun Oct 16 03:02:46 2011 -0400
     1.3 @@ -81,7 +81,7 @@
     1.4          : "=r" (result) : "r" (lock), "0" (1) : "cc", "memory");
     1.5  	return (result == 0);
     1.6  
     1.7 -#elif defined(__MACOSX__)
     1.8 +#elif defined(__MACOSX__) || defined(__IPHONEOS__)
     1.9      /* Maybe used for PowerPC, but the Intel asm or gcc atomics are favored. */
    1.10      return OSAtomicCompareAndSwap32Barrier(0, 1, lock);
    1.11