comparison src/atomic/linux/SDL_atomic.c @ 3201:c297230efc75

Disabling 64 bit atomics operations until I figure out why they do not link.
author Bob Pendleton <bob@pendleton.com>
date Wed, 24 Jun 2009 22:24:23 +0000
parents ef2c029a3a9d
children 3aa519a5c676
comparison
equal deleted inserted replaced
3200:ef2c029a3a9d 3201:c297230efc75
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 18
19 Sam Lantinga 19 Sam Lantinga
20 slouken@libsdl.org 20 slouken@libsdl.org
21 */ 21 */
22
23 #ifdef SDL_ATOMIC_LINUX
24 22
25 #include "SDL.h" 23 #include "SDL.h"
26 #include "SDL_config.h" 24 #include "SDL_config.h"
27 #include "SDL_atomic.h" 25 #include "SDL_atomic.h"
28 26
96 SDL_AtomicSubtractThenFetch32(Uint32 * ptr, Uint32 value) 94 SDL_AtomicSubtractThenFetch32(Uint32 * ptr, Uint32 value)
97 { 95 {
98 return __sync_sub_and_fetch(ptr, value); 96 return __sync_sub_and_fetch(ptr, value);
99 } 97 }
100 98
101 #ifdef SDL_HAS_64BIT_TYPE 99 /* #ifdef SDL_HAS_64BIT_TYPE */
100 #if 0
102 101
103 Uint64 102 Uint64
104 SDL_AtomicExchange64(Uint64 * ptr, Uint64 value) 103 SDL_AtomicExchange64(Uint64 * ptr, Uint64 value)
105 { 104 {
106 return __sync_lock_test_and_set(ptr, value); 105 return __sync_lock_test_and_set(ptr, value);
170 SDL_AtomicSubtractThenFetch64(Uint64 * ptr, Uint64 value) 169 SDL_AtomicSubtractThenFetch64(Uint64 * ptr, Uint64 value)
171 { 170 {
172 return __sync_sub_and_fetch(ptr, value); 171 return __sync_sub_and_fetch(ptr, value);
173 } 172 }
174 #endif 173 #endif
175 #endif