comparison src/atomic/linux/SDL_atomic.c @ 3296:6fe620d7ce92

Should now compile on 32 bit linux and 64 bit linux
author Bob Pendleton <bob@pendleton.com>
date Mon, 21 Sep 2009 22:23:41 +0000
parents 72b542f34739
children d430982cd5cc
comparison
equal deleted inserted replaced
3295:4ff84e8939c1 3296:6fe620d7ce92
80 #define nativeIncrementThenFetch32 80 #define nativeIncrementThenFetch32
81 #define nativeDecrementThenFetch32 81 #define nativeDecrementThenFetch32
82 #define nativeAddThenFetch32 82 #define nativeAddThenFetch32
83 #define nativeSubtractThenFetch32 83 #define nativeSubtractThenFetch32
84 84
85 #define nativeTestThenSet64 85 #ifdef SDL_HAS_64BIT_TYPE
86 #define nativeClear64 86 #ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
87 #define nativeFetchThenIncrement64 87 #define nativeTestThenSet64
88 #define nativeFetchThenDecrement64 88 #define nativeClear64
89 #define nativeFetchThenAdd64 89 #define nativeFetchThenIncrement64
90 #define nativeFetchThenSubtract64 90 #define nativeFetchThenDecrement64
91 #define nativeIncrementThenFetch64 91 #define nativeFetchThenAdd64
92 #define nativeDecrementThenFetch64 92 #define nativeFetchThenSubtract64
93 #define nativeAddThenFetch64 93 #define nativeIncrementThenFetch64
94 #define nativeSubtractThenFetch64 94 #define nativeDecrementThenFetch64
95 #define nativeAddThenFetch64
96 #define nativeSubtractThenFetch64
97 #elif
98 #undef nativeTestThenSet64
99 #undef nativeClear64
100 #undef nativeFetchThenIncrement64
101 #undef nativeFetchThenDecrement64
102 #undef nativeFetchThenAdd64
103 #undef nativeFetchThenSubtract64
104 #undef nativeIncrementThenFetch64
105 #undef nativeDecrementThenFetch64
106 #undef nativeAddThenFetch64
107 #undef nativeSubtractThenFetch64
108 #endif /* __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 */
109 #endif /* SDL_HAS_64BIT_TYPE */
95 110
96 /* 111 /*
97 If any of the operations are not provided then we must emulate some 112 If any of the operations are not provided then we must emulate some
98 of them. That means we need a nice implementation of spin locks 113 of them. That means we need a nice implementation of spin locks
99 that avoids the "one big lock" problem. We use a vector of spin 114 that avoids the "one big lock" problem. We use a vector of spin