comparison include/SDL_atomic.h @ 5230:5d01d426f2ea

It's now possible to disable the fast atomic operations, at a huge performance penalty.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 07 Feb 2011 22:57:33 -0800
parents 1a47d41912ff
children b530ef003506
comparison
equal deleted inserted replaced
5229:2178ffe17222 5230:5d01d426f2ea
139 #endif 139 #endif
140 140
141 /* Platform specific optimized versions of the atomic functions, 141 /* Platform specific optimized versions of the atomic functions,
142 * you can disable these by defining SDL_DISABLE_ATOMIC_INLINE 142 * you can disable these by defining SDL_DISABLE_ATOMIC_INLINE
143 */ 143 */
144 #if SDL_ATOMIC_DISABLED
145 #define SDL_DISABLE_ATOMIC_INLINE
146 #endif
144 #ifndef SDL_DISABLE_ATOMIC_INLINE 147 #ifndef SDL_DISABLE_ATOMIC_INLINE
145 148
146 #ifdef HAVE_MSC_ATOMICS 149 #ifdef HAVE_MSC_ATOMICS
147 150
148 #define SDL_AtomicSet(a, v) _InterlockedExchange((long*)&(a)->value, (v)) 151 #define SDL_AtomicSet(a, v) _InterlockedExchange((long*)&(a)->value, (v))