I forgot to copy the dummy version to macosx.
authorBob Pendleton <bob@pendleton.com>
Tue, 11 Aug 2009 21:15:18 +0000
changeset 3236d7497988b677
parent 3235 d35b649858e0
child 3237 916f396fe65d
I forgot to copy the dummy version to macosx.
src/atomic/macosx/SDL_atomic.c
     1.1 --- a/src/atomic/macosx/SDL_atomic.c	Tue Aug 11 13:45:01 2009 +0000
     1.2 +++ b/src/atomic/macosx/SDL_atomic.c	Tue Aug 11 21:15:18 2009 +0000
     1.3 @@ -165,7 +165,7 @@
     1.4  /* 8 bit atomic operations */
     1.5  
     1.6  Uint8
     1.7 -SDL_AtomicExchange8(Uint8 * ptr, Uint8 value)
     1.8 +SDL_AtomicExchange8(volatile Uint8 * ptr, Uint8 value)
     1.9  {
    1.10  #ifdef nativeExchange8
    1.11     return nativeExchange8(ptr, value);
    1.12 @@ -182,7 +182,7 @@
    1.13  }
    1.14  
    1.15  SDL_bool
    1.16 -SDL_AtomicCompareThenSet8(Uint8 * ptr, Uint8 oldvalue, Uint8 newvalue)
    1.17 +SDL_AtomicCompareThenSet8(volatile Uint8 * ptr, Uint8 oldvalue, Uint8 newvalue)
    1.18  {
    1.19  #ifdef nativeCompareThenSet8
    1.20     return (SDL_bool)nativeCompareThenSet8(ptr, oldvalue, newvalue);
    1.21 @@ -202,7 +202,7 @@
    1.22  }
    1.23  
    1.24  SDL_bool
    1.25 -SDL_AtomicTestThenSet8(Uint8 * ptr)
    1.26 +SDL_AtomicTestThenSet8(volatile Uint8 * ptr)
    1.27  {
    1.28  #ifdef nativeTestThenSet8
    1.29     return (SDL_bool)nativeTestThenSet8(ptr);
    1.30 @@ -222,7 +222,7 @@
    1.31  }
    1.32  
    1.33  void
    1.34 -SDL_AtomicClear8(Uint8 * ptr)
    1.35 +SDL_AtomicClear8(volatile Uint8 * ptr)
    1.36  {
    1.37  #ifdef nativeClear8
    1.38     nativeClear8(ptr);
    1.39 @@ -236,7 +236,7 @@
    1.40  }
    1.41  
    1.42  Uint8
    1.43 -SDL_AtomicFetchThenIncrement8(Uint8 * ptr)
    1.44 +SDL_AtomicFetchThenIncrement8(volatile Uint8 * ptr)
    1.45  {
    1.46  #ifdef nativeFetchThenIncrement8
    1.47     return nativeFetchThenIncrement8(ptr);
    1.48 @@ -253,7 +253,7 @@
    1.49  }
    1.50  
    1.51  Uint8
    1.52 -SDL_AtomicFetchThenDecrement8(Uint8 * ptr)
    1.53 +SDL_AtomicFetchThenDecrement8(volatile Uint8 * ptr)
    1.54  {
    1.55  #ifdef nativeFetchThenDecrement8
    1.56     return nativeFetchThenDecrement8(ptr);
    1.57 @@ -270,7 +270,7 @@
    1.58  }
    1.59  
    1.60  Uint8
    1.61 -SDL_AtomicFetchThenAdd8(Uint8 * ptr, Uint8 value)
    1.62 +SDL_AtomicFetchThenAdd8(volatile Uint8 * ptr, Uint8 value)
    1.63  {
    1.64  #ifdef nativeFetchThenAdd8
    1.65     return nativeFetchThenAdd8(ptr, value);
    1.66 @@ -287,7 +287,7 @@
    1.67  }
    1.68  
    1.69  Uint8
    1.70 -SDL_AtomicFetchThenSubtract8(Uint8 * ptr, Uint8 value)
    1.71 +SDL_AtomicFetchThenSubtract8(volatile Uint8 * ptr, Uint8 value)
    1.72  {
    1.73  #ifdef nativeFetchThenSubtract8
    1.74     return nativeFetchThenSubtract8(ptr, value);
    1.75 @@ -304,7 +304,7 @@
    1.76  }
    1.77  
    1.78  Uint8
    1.79 -SDL_AtomicIncrementThenFetch8(Uint8 * ptr)
    1.80 +SDL_AtomicIncrementThenFetch8(volatile Uint8 * ptr)
    1.81  {
    1.82  #ifdef nativeIncrementThenFetch8
    1.83     return nativeIncrementThenFetch8(ptr);
    1.84 @@ -321,7 +321,7 @@
    1.85  }
    1.86  
    1.87  Uint8
    1.88 -SDL_AtomicDecrementThenFetch8(Uint8 * ptr)
    1.89 +SDL_AtomicDecrementThenFetch8(volatile Uint8 * ptr)
    1.90  {
    1.91  #ifdef nativeDecrementThenFetch8
    1.92     return nativeDecrementThenFetch8(ptr);
    1.93 @@ -338,7 +338,7 @@
    1.94  }
    1.95  
    1.96  Uint8
    1.97 -SDL_AtomicAddThenFetch8(Uint8 * ptr, Uint8 value)
    1.98 +SDL_AtomicAddThenFetch8(volatile Uint8 * ptr, Uint8 value)
    1.99  {
   1.100  #ifdef nativeAddThenFetch8
   1.101     return nativeAddThenFetch8(ptr, value);
   1.102 @@ -355,7 +355,7 @@
   1.103  }
   1.104  
   1.105  Uint8
   1.106 -SDL_AtomicSubtractThenFetch8(Uint8 * ptr, Uint8 value)
   1.107 +SDL_AtomicSubtractThenFetch8(volatile Uint8 * ptr, Uint8 value)
   1.108  {
   1.109  #ifdef nativeSubtractThenFetch8
   1.110     return nativeSubtractThenFetch8(ptr, value);
   1.111 @@ -374,7 +374,7 @@
   1.112  /* 16 bit atomic operations */
   1.113  
   1.114  Uint16
   1.115 -SDL_AtomicExchange16(Uint16 * ptr, Uint16 value)
   1.116 +SDL_AtomicExchange16(volatile Uint16 * ptr, Uint16 value)
   1.117  {
   1.118  #ifdef nativeExchange16
   1.119     return nativeExchange16(ptr, value);
   1.120 @@ -391,7 +391,7 @@
   1.121  }
   1.122  
   1.123  SDL_bool
   1.124 -SDL_AtomicCompareThenSet16(Uint16 * ptr, Uint16 oldvalue, Uint16 newvalue)
   1.125 +SDL_AtomicCompareThenSet16(volatile Uint16 * ptr, Uint16 oldvalue, Uint16 newvalue)
   1.126  {
   1.127  #ifdef nativeCompareThenSet16
   1.128     return (SDL_bool)nativeCompareThenSet16(ptr, oldvalue, newvalue);
   1.129 @@ -411,7 +411,7 @@
   1.130  }
   1.131  
   1.132  SDL_bool
   1.133 -SDL_AtomicTestThenSet16(Uint16 * ptr)
   1.134 +SDL_AtomicTestThenSet16(volatile Uint16 * ptr)
   1.135  {
   1.136  #ifdef nativeTestThenSet16
   1.137     return (SDL_bool)nativeTestThenSet16(ptr);
   1.138 @@ -431,7 +431,7 @@
   1.139  }
   1.140  
   1.141  void
   1.142 -SDL_AtomicClear16(Uint16 * ptr)
   1.143 +SDL_AtomicClear16(volatile Uint16 * ptr)
   1.144  {
   1.145  #ifdef nativeClear16
   1.146     nativeClear16(ptr);
   1.147 @@ -445,7 +445,7 @@
   1.148  }
   1.149  
   1.150  Uint16
   1.151 -SDL_AtomicFetchThenIncrement16(Uint16 * ptr)
   1.152 +SDL_AtomicFetchThenIncrement16(volatile Uint16 * ptr)
   1.153  {
   1.154  #ifdef nativeFetchThenIncrement16
   1.155     return nativeFetchThenIncrement16(ptr);
   1.156 @@ -462,7 +462,7 @@
   1.157  }
   1.158  
   1.159  Uint16
   1.160 -SDL_AtomicFetchThenDecrement16(Uint16 * ptr)
   1.161 +SDL_AtomicFetchThenDecrement16(volatile Uint16 * ptr)
   1.162  {
   1.163  #ifdef nativeFetchThenDecrement16
   1.164     return nativeFetchThenDecrement16(ptr);
   1.165 @@ -479,7 +479,7 @@
   1.166  }
   1.167  
   1.168  Uint16
   1.169 -SDL_AtomicFetchThenAdd16(Uint16 * ptr, Uint16 value)
   1.170 +SDL_AtomicFetchThenAdd16(volatile Uint16 * ptr, Uint16 value)
   1.171  {
   1.172  #ifdef nativeFetchThenAdd16
   1.173     return nativeFetchThenAdd16(ptr, value);
   1.174 @@ -496,7 +496,7 @@
   1.175  }
   1.176  
   1.177  Uint16
   1.178 -SDL_AtomicFetchThenSubtract16(Uint16 * ptr, Uint16 value)
   1.179 +SDL_AtomicFetchThenSubtract16(volatile Uint16 * ptr, Uint16 value)
   1.180  {
   1.181  #ifdef nativeFetchThenSubtract16
   1.182     return nativeFetchThenSubtract16(ptr, value);
   1.183 @@ -513,7 +513,7 @@
   1.184  }
   1.185  
   1.186  Uint16
   1.187 -SDL_AtomicIncrementThenFetch16(Uint16 * ptr)
   1.188 +SDL_AtomicIncrementThenFetch16(volatile Uint16 * ptr)
   1.189  {
   1.190  #ifdef nativeIncrementThenFetch16
   1.191     return nativeIncrementThenFetch16(ptr);
   1.192 @@ -530,7 +530,7 @@
   1.193  }
   1.194  
   1.195  Uint16
   1.196 -SDL_AtomicDecrementThenFetch16(Uint16 * ptr)
   1.197 +SDL_AtomicDecrementThenFetch16(volatile Uint16 * ptr)
   1.198  {
   1.199  #ifdef nativeDecrementThenFetch16
   1.200     return nativeDecrementThenFetch16(ptr);
   1.201 @@ -547,7 +547,7 @@
   1.202  }
   1.203  
   1.204  Uint16
   1.205 -SDL_AtomicAddThenFetch16(Uint16 * ptr, Uint16 value)
   1.206 +SDL_AtomicAddThenFetch16(volatile Uint16 * ptr, Uint16 value)
   1.207  {
   1.208  #ifdef nativeAddThenFetch16
   1.209     return nativeAddThenFetch16(ptr, value);
   1.210 @@ -564,7 +564,7 @@
   1.211  }
   1.212  
   1.213  Uint16
   1.214 -SDL_AtomicSubtractThenFetch16(Uint16 * ptr, Uint16 value)
   1.215 +SDL_AtomicSubtractThenFetch16(volatile Uint16 * ptr, Uint16 value)
   1.216  {
   1.217  #ifdef nativeSubtractThenFetch16
   1.218     return nativeSubtractThenFetch16(ptr, value);
   1.219 @@ -583,7 +583,7 @@
   1.220  /* 32 bit atomic operations */
   1.221  
   1.222  Uint32
   1.223 -SDL_AtomicExchange32(Uint32 * ptr, Uint32 value)
   1.224 +SDL_AtomicExchange32(volatile Uint32 * ptr, Uint32 value)
   1.225  {
   1.226  #ifdef nativeExchange32
   1.227     return nativeExchange32(ptr, value);
   1.228 @@ -600,7 +600,7 @@
   1.229  }
   1.230  
   1.231  SDL_bool
   1.232 -SDL_AtomicCompareThenSet32(Uint32 * ptr, Uint32 oldvalue, Uint32 newvalue)
   1.233 +SDL_AtomicCompareThenSet32(volatile Uint32 * ptr, Uint32 oldvalue, Uint32 newvalue)
   1.234  {
   1.235  #ifdef nativeCompareThenSet32
   1.236     return (SDL_bool)nativeCompareThenSet32(ptr, oldvalue, newvalue);
   1.237 @@ -620,7 +620,7 @@
   1.238  }
   1.239  
   1.240  SDL_bool
   1.241 -SDL_AtomicTestThenSet32(Uint32 * ptr)
   1.242 +SDL_AtomicTestThenSet32(volatile Uint32 * ptr)
   1.243  {
   1.244  #ifdef nativeTestThenSet32
   1.245     return (SDL_bool)nativeTestThenSet32(ptr);
   1.246 @@ -640,7 +640,7 @@
   1.247  }
   1.248  
   1.249  void
   1.250 -SDL_AtomicClear32(Uint32 * ptr)
   1.251 +SDL_AtomicClear32(volatile Uint32 * ptr)
   1.252  {
   1.253  #ifdef nativeClear32
   1.254     nativeClear32(ptr);
   1.255 @@ -654,7 +654,7 @@
   1.256  }
   1.257  
   1.258  Uint32
   1.259 -SDL_AtomicFetchThenIncrement32(Uint32 * ptr)
   1.260 +SDL_AtomicFetchThenIncrement32(volatile Uint32 * ptr)
   1.261  {
   1.262  #ifdef nativeFetchThenIncrement32
   1.263     return nativeFetchThenIncrement32(ptr);
   1.264 @@ -671,7 +671,7 @@
   1.265  }
   1.266  
   1.267  Uint32
   1.268 -SDL_AtomicFetchThenDecrement32(Uint32 * ptr)
   1.269 +SDL_AtomicFetchThenDecrement32(volatile Uint32 * ptr)
   1.270  {
   1.271  #ifdef nativeFetchThenDecrement32
   1.272     return nativeFetchThenDecrement32(ptr);
   1.273 @@ -688,7 +688,7 @@
   1.274  }
   1.275  
   1.276  Uint32
   1.277 -SDL_AtomicFetchThenAdd32(Uint32 * ptr, Uint32 value)
   1.278 +SDL_AtomicFetchThenAdd32(volatile Uint32 * ptr, Uint32 value)
   1.279  {
   1.280  #ifdef nativeFetchThenAdd32
   1.281     return nativeFetchThenAdd32(ptr, value);
   1.282 @@ -705,7 +705,7 @@
   1.283  }
   1.284  
   1.285  Uint32
   1.286 -SDL_AtomicFetchThenSubtract32(Uint32 * ptr, Uint32 value)
   1.287 +SDL_AtomicFetchThenSubtract32(volatile Uint32 * ptr, Uint32 value)
   1.288  {
   1.289  #ifdef nativeFetchThenSubtract32
   1.290     return nativeFetchThenSubtract32(ptr, value);
   1.291 @@ -722,7 +722,7 @@
   1.292  }
   1.293  
   1.294  Uint32
   1.295 -SDL_AtomicIncrementThenFetch32(Uint32 * ptr)
   1.296 +SDL_AtomicIncrementThenFetch32(volatile Uint32 * ptr)
   1.297  {
   1.298  #ifdef nativeIncrementThenFetch32
   1.299     return nativeIncrementThenFetch32(ptr);
   1.300 @@ -739,7 +739,7 @@
   1.301  }
   1.302  
   1.303  Uint32
   1.304 -SDL_AtomicDecrementThenFetch32(Uint32 * ptr)
   1.305 +SDL_AtomicDecrementThenFetch32(volatile Uint32 * ptr)
   1.306  {
   1.307  #ifdef nativeDecrementThenFetch32
   1.308     return nativeDecrementThenFetch32(ptr);
   1.309 @@ -756,7 +756,7 @@
   1.310  }
   1.311  
   1.312  Uint32
   1.313 -SDL_AtomicAddThenFetch32(Uint32 * ptr, Uint32 value)
   1.314 +SDL_AtomicAddThenFetch32(volatile Uint32 * ptr, Uint32 value)
   1.315  {
   1.316  #ifdef nativeAddThenFetch32
   1.317     return nativeAddThenFetch32(ptr, value);
   1.318 @@ -773,7 +773,7 @@
   1.319  }
   1.320  
   1.321  Uint32
   1.322 -SDL_AtomicSubtractThenFetch32(Uint32 * ptr, Uint32 value)
   1.323 +SDL_AtomicSubtractThenFetch32(volatile Uint32 * ptr, Uint32 value)
   1.324  {
   1.325  #ifdef nativeSubtractThenFetch32
   1.326     return nativeSubtractThenFetch32(ptr, value);
   1.327 @@ -793,7 +793,7 @@
   1.328  #ifdef SDL_HAS_64BIT_TYPE
   1.329  
   1.330  Uint64
   1.331 -SDL_AtomicExchange64(Uint64 * ptr, Uint64 value)
   1.332 +SDL_AtomicExchange64(volatile Uint64 * ptr, Uint64 value)
   1.333  {
   1.334  #ifdef nativeExchange64
   1.335     return nativeExchange64(ptr, value);
   1.336 @@ -810,7 +810,7 @@
   1.337  }
   1.338  
   1.339  SDL_bool
   1.340 -SDL_AtomicCompareThenSet64(Uint64 * ptr, Uint64 oldvalue, Uint64 newvalue)
   1.341 +SDL_AtomicCompareThenSet64(volatile Uint64 * ptr, Uint64 oldvalue, Uint64 newvalue)
   1.342  {
   1.343  #ifdef nativeCompareThenSet64
   1.344     return (SDL_bool)nativeCompareThenSet64(ptr, oldvalue, newvalue);
   1.345 @@ -830,7 +830,7 @@
   1.346  }
   1.347  
   1.348  SDL_bool
   1.349 -SDL_AtomicTestThenSet64(Uint64 * ptr)
   1.350 +SDL_AtomicTestThenSet64(volatile Uint64 * ptr)
   1.351  {
   1.352  #ifdef nativeTestThenSet64
   1.353     return (SDL_bool)nativeTestThenSet64(ptr);
   1.354 @@ -850,7 +850,7 @@
   1.355  }
   1.356  
   1.357  void
   1.358 -SDL_AtomicClear64(Uint64 * ptr)
   1.359 +SDL_AtomicClear64(volatile Uint64 * ptr)
   1.360  {
   1.361  #ifdef nativeClear64
   1.362     nativeClear64(ptr);
   1.363 @@ -864,7 +864,7 @@
   1.364  }
   1.365  
   1.366  Uint64
   1.367 -SDL_AtomicFetchThenIncrement64(Uint64 * ptr)
   1.368 +SDL_AtomicFetchThenIncrement64(volatile Uint64 * ptr)
   1.369  {
   1.370  #ifdef nativeFetchThenIncrement64
   1.371     return nativeFetchThenIncrement64(ptr);
   1.372 @@ -881,7 +881,7 @@
   1.373  }
   1.374  
   1.375  Uint64
   1.376 -SDL_AtomicFetchThenDecrement64(Uint64 * ptr)
   1.377 +SDL_AtomicFetchThenDecrement64(volatile Uint64 * ptr)
   1.378  {
   1.379  #ifdef nativeFetchThenDecrement64
   1.380     return nativeFetchThenDecrement64(ptr);
   1.381 @@ -898,7 +898,7 @@
   1.382  }
   1.383  
   1.384  Uint64
   1.385 -SDL_AtomicFetchThenAdd64(Uint64 * ptr, Uint64 value)
   1.386 +SDL_AtomicFetchThenAdd64(volatile Uint64 * ptr, Uint64 value)
   1.387  {
   1.388  #ifdef nativeFetchThenAdd64
   1.389     return nativeFetchThenAdd64(ptr, value);
   1.390 @@ -915,7 +915,7 @@
   1.391  }
   1.392  
   1.393  Uint64
   1.394 -SDL_AtomicFetchThenSubtract64(Uint64 * ptr, Uint64 value)
   1.395 +SDL_AtomicFetchThenSubtract64(volatile Uint64 * ptr, Uint64 value)
   1.396  {
   1.397  #ifdef nativeFetchThenSubtract64
   1.398     return nativeFetchThenSubtract64(ptr, value);
   1.399 @@ -932,7 +932,7 @@
   1.400  }
   1.401  
   1.402  Uint64
   1.403 -SDL_AtomicIncrementThenFetch64(Uint64 * ptr)
   1.404 +SDL_AtomicIncrementThenFetch64(volatile Uint64 * ptr)
   1.405  {
   1.406  #ifdef nativeIncrementThenFetch64
   1.407     return nativeIncrementThenFetch64(ptr);
   1.408 @@ -949,7 +949,7 @@
   1.409  }
   1.410  
   1.411  Uint64
   1.412 -SDL_AtomicDecrementThenFetch64(Uint64 * ptr)
   1.413 +SDL_AtomicDecrementThenFetch64(volatile Uint64 * ptr)
   1.414  {
   1.415  #ifdef nativeDecrementThenFetch64
   1.416     return nativeDecrementThenFetch64(ptr);
   1.417 @@ -966,7 +966,7 @@
   1.418  }
   1.419  
   1.420  Uint64
   1.421 -SDL_AtomicAddThenFetch64(Uint64 * ptr, Uint64 value)
   1.422 +SDL_AtomicAddThenFetch64(volatile Uint64 * ptr, Uint64 value)
   1.423  {
   1.424  #ifdef nativeAddThenFetch64
   1.425     return nativeAddThenFetch64(ptr, value);
   1.426 @@ -983,7 +983,7 @@
   1.427  }
   1.428  
   1.429  Uint64
   1.430 -SDL_AtomicSubtractThenFetch64(Uint64 * ptr, Uint64 value)
   1.431 +SDL_AtomicSubtractThenFetch64(volatile Uint64 * ptr, Uint64 value)
   1.432  {
   1.433  #ifdef nativeSubtractThenFetch64
   1.434     return nativeSubtractThenFetch64(ptr, value);