include/SDL_atomic.h
changeset 3237 916f396fe65d
parent 3216 48a80f2a7ff2
child 3261 72b542f34739
     1.1 --- a/include/SDL_atomic.h	Tue Aug 11 21:15:18 2009 +0000
     1.2 +++ b/include/SDL_atomic.h	Tue Aug 11 21:27:19 2009 +0000
     1.3 @@ -52,38 +52,6 @@
     1.4  
     1.5  /* Function prototypes */
     1.6  
     1.7 -/* 8 bit atomic operations */
     1.8 -
     1.9 -extern DECLSPEC Uint8 SDLCALL SDL_AtomicExchange8(volatile Uint8 * ptr, Uint8 value);
    1.10 -extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCompareThenSet8(volatile Uint8 * ptr,
    1.11 -                                                            Uint8 oldvalue, Uint8 newvalue);
    1.12 -extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTestThenSet8(volatile Uint8 * ptr);
    1.13 -extern DECLSPEC void SDLCALL SDL_AtomicClear8(volatile Uint8 * ptr);
    1.14 -extern DECLSPEC Uint8 SDLCALL SDL_AtomicFetchThenIncrement8(volatile Uint8 * ptr);
    1.15 -extern DECLSPEC Uint8 SDLCALL SDL_AtomicFetchThenDecrement8(volatile Uint8 * ptr);
    1.16 -extern DECLSPEC Uint8 SDLCALL SDL_AtomicFetchThenAdd8(volatile Uint8 * ptr, Uint8 value);
    1.17 -extern DECLSPEC Uint8 SDLCALL SDL_AtomicFetchThenSubtract8(volatile Uint8 * ptr, Uint8 value);
    1.18 -extern DECLSPEC Uint8 SDLCALL SDL_AtomicIncrementThenFetch8(volatile Uint8 * ptr);
    1.19 -extern DECLSPEC Uint8 SDLCALL SDL_AtomicDecrementThenFetch8(volatile Uint8 * ptr);
    1.20 -extern DECLSPEC Uint8 SDLCALL SDL_AtomicAddThenFetch8(volatile Uint8 * ptr, Uint8 value);
    1.21 -extern DECLSPEC Uint8 SDLCALL SDL_AtomicSubtractThenFetch8(volatile Uint8 * ptr, Uint8 value);
    1.22 -
    1.23 -/* 16 bit atomic operations */
    1.24 -
    1.25 -extern DECLSPEC Uint16 SDLCALL SDL_AtomicExchange16(volatile Uint16 * ptr, Uint16 value);
    1.26 -extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCompareThenSet16(volatile Uint16 * ptr,
    1.27 -                                                            Uint16 oldvalue, Uint16 newvalue);
    1.28 -extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTestThenSet16(volatile Uint16 * ptr);
    1.29 -extern DECLSPEC void SDLCALL SDL_AtomicClear16(volatile Uint16 * ptr);
    1.30 -extern DECLSPEC Uint16 SDLCALL SDL_AtomicFetchThenIncrement16(volatile Uint16 * ptr);
    1.31 -extern DECLSPEC Uint16 SDLCALL SDL_AtomicFetchThenDecrement16(volatile Uint16 * ptr);
    1.32 -extern DECLSPEC Uint16 SDLCALL SDL_AtomicFetchThenAdd16(volatile Uint16 * ptr, Uint16 value);
    1.33 -extern DECLSPEC Uint16 SDLCALL SDL_AtomicFetchThenSubtract16(volatile Uint16 * ptr, Uint16 value);
    1.34 -extern DECLSPEC Uint16 SDLCALL SDL_AtomicIncrementThenFetch16(volatile Uint16 * ptr);
    1.35 -extern DECLSPEC Uint16 SDLCALL SDL_AtomicDecrementThenFetch16(volatile Uint16 * ptr);
    1.36 -extern DECLSPEC Uint16 SDLCALL SDL_AtomicAddThenFetch16(volatile Uint16 * ptr, Uint16 value);
    1.37 -extern DECLSPEC Uint16 SDLCALL SDL_AtomicSubtractThenFetch16(volatile Uint16 * ptr, Uint16 value);
    1.38 -
    1.39  /* 32 bit atomic operations */
    1.40  
    1.41  /**
    1.42 @@ -101,6 +69,7 @@
    1.43   *
    1.44   */
    1.45  extern DECLSPEC Uint32 SDLCALL SDL_AtomicExchange32(volatile Uint32 * ptr, Uint32 value);
    1.46 +
    1.47  /**
    1.48   * \fn int SDL_AtomicCompareThenSet32(volatile Uint32 * ptr, Uint32 oldvalue, Uint32 newvalue)
    1.49   *
    1.50 @@ -127,6 +96,7 @@
    1.51   *
    1.52   */
    1.53  extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTestThenSet32(volatile Uint32 * ptr);
    1.54 +
    1.55  /**
    1.56   * \fn  void SDL_AtomicClear32(volatile Uint32 * ptr);
    1.57   *
    1.58 @@ -136,6 +106,7 @@
    1.59   *
    1.60   */
    1.61  extern DECLSPEC void SDLCALL SDL_AtomicClear32(volatile Uint32 * ptr);
    1.62 +
    1.63  /**
    1.64   * \fn  Uint32 SDL_AtomicFetchThenIncrement32(volatile Uint32 * ptr);
    1.65   *
    1.66 @@ -148,6 +119,7 @@
    1.67   *
    1.68   */
    1.69  extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenIncrement32(volatile Uint32 * ptr);
    1.70 +
    1.71  /**
    1.72   * \fn  Uint32 SDL_AtomicFetchThenDecrement32(volatile Uint32 * ptr);
    1.73   *
    1.74 @@ -159,6 +131,7 @@
    1.75   *
    1.76   */
    1.77  extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenDecrement32(volatile Uint32 * ptr);
    1.78 +
    1.79  /**
    1.80   * \fn  Uint32 SDL_AtomicFetchThenAdd32(volatile Uint32 * ptr, Uint32 value);
    1.81   *
    1.82 @@ -171,6 +144,7 @@
    1.83   *
    1.84   */
    1.85  extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenAdd32(volatile Uint32 * ptr, Uint32 value);
    1.86 +
    1.87  /**
    1.88   * \fn  Uint32 SDL_AtomicFetchThenSubtract32(volatile Uint32 * ptr, Uint32 value);
    1.89   *
    1.90 @@ -183,6 +157,7 @@
    1.91   *
    1.92   */
    1.93  extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenSubtract32(volatile Uint32 * ptr, Uint32 value);
    1.94 +
    1.95  /**
    1.96   * \fn  Uint32 SDL_AtomicIncrementThenFetch32(volatile Uint32 * ptr);
    1.97   *
    1.98 @@ -194,6 +169,7 @@
    1.99   *
   1.100   */
   1.101  extern DECLSPEC Uint32 SDLCALL SDL_AtomicIncrementThenFetch32(volatile Uint32 * ptr);
   1.102 +
   1.103  /**
   1.104   * \fn  Uint32 SDL_AtomicDecrementThenFetch32(volatile Uint32 * ptr);
   1.105   *
   1.106 @@ -205,6 +181,7 @@
   1.107   *
   1.108   */
   1.109  extern DECLSPEC Uint32 SDLCALL SDL_AtomicDecrementThenFetch32(volatile Uint32 * ptr);
   1.110 +
   1.111  /**
   1.112   * \fn  Uint32 SDL_AtomicAddThenFetch32(volatile Uint32 * ptr, Uint32 value);
   1.113   *
   1.114 @@ -217,6 +194,7 @@
   1.115   *
   1.116   */
   1.117  extern DECLSPEC Uint32 SDLCALL SDL_AtomicAddThenFetch32(volatile Uint32 * ptr, Uint32 value);
   1.118 +
   1.119  /**
   1.120   * \fn  Uint32 SDL_AtomicSubtractThenFetch32(volatile Uint32 * ptr, Uint32 value);
   1.121   *