include/SDL_atomic.h
changeset 6978 e851407e9294
parent 6923 d3b709232670
child 7004 18d4df6942c2
equal deleted inserted replaced
6977:b73d51026c68 6978:e851407e9294
   194  * \return SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.
   194  * \return SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.
   195  *
   195  *
   196  * \note If you don't know what this function is for, you shouldn't use it!
   196  * \note If you don't know what this function is for, you shouldn't use it!
   197 */
   197 */
   198 #ifndef SDL_AtomicCAS
   198 #ifndef SDL_AtomicCAS
   199 #define SDL_AtomicCAS SDL_AtomicCAS_
   199 extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);
   200 #endif
   200 #endif
   201 extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS_(SDL_atomic_t *a, int oldval, int newval);
       
   202 
   201 
   203 /**
   202 /**
   204  * \brief Set an atomic variable to a value.
   203  * \brief Set an atomic variable to a value.
   205  *
   204  *
   206  * \return The previous value of the atomic variable.
   205  * \return The previous value of the atomic variable.
   269  * \return SDL_TRUE if the pointer was set, SDL_FALSE otherwise.
   268  * \return SDL_TRUE if the pointer was set, SDL_FALSE otherwise.
   270  *
   269  *
   271  * \note If you don't know what this function is for, you shouldn't use it!
   270  * \note If you don't know what this function is for, you shouldn't use it!
   272 */
   271 */
   273 #ifndef SDL_AtomicCASPtr
   272 #ifndef SDL_AtomicCASPtr
   274 #define SDL_AtomicCASPtr SDL_AtomicCASPtr_
   273 extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void* *a, void *oldval, void *newval);
   275 #endif
   274 #endif
   276 extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr_(void* *a, void *oldval, void *newval);
       
   277 
   275 
   278 /**
   276 /**
   279  * \brief Set a pointer to a value atomically.
   277  * \brief Set a pointer to a value atomically.
   280  *
   278  *
   281  * \return The previous value of the pointer.
   279  * \return The previous value of the pointer.