Commit 66de021c authored by Bob Pendleton's avatar Bob Pendleton

volitile... duh, yeah the variable need to be labeled volitile

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403698
parent 29167b57
...@@ -54,40 +54,40 @@ extern "C" { ...@@ -54,40 +54,40 @@ extern "C" {
/* 8 bit atomic operations */ /* 8 bit atomic operations */
extern DECLSPEC Uint8 SDLCALL SDL_AtomicExchange8(Uint8 * ptr, Uint8 value); extern DECLSPEC Uint8 SDLCALL SDL_AtomicExchange8(volatile Uint8 * ptr, Uint8 value);
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCompareThenSet8(Uint8 * ptr, extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCompareThenSet8(volatile Uint8 * ptr,
Uint8 oldvalue, Uint8 newvalue); Uint8 oldvalue, Uint8 newvalue);
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTestThenSet8(Uint8 * ptr); extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTestThenSet8(volatile Uint8 * ptr);
extern DECLSPEC void SDLCALL SDL_AtomicClear8(Uint8 * ptr); extern DECLSPEC void SDLCALL SDL_AtomicClear8(volatile Uint8 * ptr);
extern DECLSPEC Uint8 SDLCALL SDL_AtomicFetchThenIncrement8(Uint8 * ptr); extern DECLSPEC Uint8 SDLCALL SDL_AtomicFetchThenIncrement8(volatile Uint8 * ptr);
extern DECLSPEC Uint8 SDLCALL SDL_AtomicFetchThenDecrement8(Uint8 * ptr); extern DECLSPEC Uint8 SDLCALL SDL_AtomicFetchThenDecrement8(volatile Uint8 * ptr);
extern DECLSPEC Uint8 SDLCALL SDL_AtomicFetchThenAdd8(Uint8 * ptr, Uint8 value); extern DECLSPEC Uint8 SDLCALL SDL_AtomicFetchThenAdd8(volatile Uint8 * ptr, Uint8 value);
extern DECLSPEC Uint8 SDLCALL SDL_AtomicFetchThenSubtract8(Uint8 * ptr, Uint8 value); extern DECLSPEC Uint8 SDLCALL SDL_AtomicFetchThenSubtract8(volatile Uint8 * ptr, Uint8 value);
extern DECLSPEC Uint8 SDLCALL SDL_AtomicIncrementThenFetch8(Uint8 * ptr); extern DECLSPEC Uint8 SDLCALL SDL_AtomicIncrementThenFetch8(volatile Uint8 * ptr);
extern DECLSPEC Uint8 SDLCALL SDL_AtomicDecrementThenFetch8(Uint8 * ptr); extern DECLSPEC Uint8 SDLCALL SDL_AtomicDecrementThenFetch8(volatile Uint8 * ptr);
extern DECLSPEC Uint8 SDLCALL SDL_AtomicAddThenFetch8(Uint8 * ptr, Uint8 value); extern DECLSPEC Uint8 SDLCALL SDL_AtomicAddThenFetch8(volatile Uint8 * ptr, Uint8 value);
extern DECLSPEC Uint8 SDLCALL SDL_AtomicSubtractThenFetch8(Uint8 * ptr, Uint8 value); extern DECLSPEC Uint8 SDLCALL SDL_AtomicSubtractThenFetch8(volatile Uint8 * ptr, Uint8 value);
/* 16 bit atomic operations */ /* 16 bit atomic operations */
extern DECLSPEC Uint16 SDLCALL SDL_AtomicExchange16(Uint16 * ptr, Uint16 value); extern DECLSPEC Uint16 SDLCALL SDL_AtomicExchange16(volatile Uint16 * ptr, Uint16 value);
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCompareThenSet16(Uint16 * ptr, extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCompareThenSet16(volatile Uint16 * ptr,
Uint16 oldvalue, Uint16 newvalue); Uint16 oldvalue, Uint16 newvalue);
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTestThenSet16(Uint16 * ptr); extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTestThenSet16(volatile Uint16 * ptr);
extern DECLSPEC void SDLCALL SDL_AtomicClear16(Uint16 * ptr); extern DECLSPEC void SDLCALL SDL_AtomicClear16(volatile Uint16 * ptr);
extern DECLSPEC Uint16 SDLCALL SDL_AtomicFetchThenIncrement16(Uint16 * ptr); extern DECLSPEC Uint16 SDLCALL SDL_AtomicFetchThenIncrement16(volatile Uint16 * ptr);
extern DECLSPEC Uint16 SDLCALL SDL_AtomicFetchThenDecrement16(Uint16 * ptr); extern DECLSPEC Uint16 SDLCALL SDL_AtomicFetchThenDecrement16(volatile Uint16 * ptr);
extern DECLSPEC Uint16 SDLCALL SDL_AtomicFetchThenAdd16(Uint16 * ptr, Uint16 value); extern DECLSPEC Uint16 SDLCALL SDL_AtomicFetchThenAdd16(volatile Uint16 * ptr, Uint16 value);
extern DECLSPEC Uint16 SDLCALL SDL_AtomicFetchThenSubtract16(Uint16 * ptr, Uint16 value); extern DECLSPEC Uint16 SDLCALL SDL_AtomicFetchThenSubtract16(volatile Uint16 * ptr, Uint16 value);
extern DECLSPEC Uint16 SDLCALL SDL_AtomicIncrementThenFetch16(Uint16 * ptr); extern DECLSPEC Uint16 SDLCALL SDL_AtomicIncrementThenFetch16(volatile Uint16 * ptr);
extern DECLSPEC Uint16 SDLCALL SDL_AtomicDecrementThenFetch16(Uint16 * ptr); extern DECLSPEC Uint16 SDLCALL SDL_AtomicDecrementThenFetch16(volatile Uint16 * ptr);
extern DECLSPEC Uint16 SDLCALL SDL_AtomicAddThenFetch16(Uint16 * ptr, Uint16 value); extern DECLSPEC Uint16 SDLCALL SDL_AtomicAddThenFetch16(volatile Uint16 * ptr, Uint16 value);
extern DECLSPEC Uint16 SDLCALL SDL_AtomicSubtractThenFetch16(Uint16 * ptr, Uint16 value); extern DECLSPEC Uint16 SDLCALL SDL_AtomicSubtractThenFetch16(volatile Uint16 * ptr, Uint16 value);
/* 32 bit atomic operations */ /* 32 bit atomic operations */
/** /**
* \fn int SDL_AtomicExchange32(Uint32 * ptr, Uint32 value) * \fn int SDL_AtomicExchange32(volatile Uint32 * ptr, Uint32 value)
* *
* \brief Atomically exchange two 32 bit values. * \brief Atomically exchange two 32 bit values.
* *
...@@ -100,9 +100,9 @@ extern DECLSPEC Uint16 SDLCALL SDL_AtomicSubtractThenFetch16(Uint16 * ptr, Uint1 ...@@ -100,9 +100,9 @@ extern DECLSPEC Uint16 SDLCALL SDL_AtomicSubtractThenFetch16(Uint16 * ptr, Uint1
* with value. This function can be used to implement SDL_TestThenSet. * with value. This function can be used to implement SDL_TestThenSet.
* *
*/ */
extern DECLSPEC Uint32 SDLCALL SDL_AtomicExchange32(Uint32 * ptr, Uint32 value); extern DECLSPEC Uint32 SDLCALL SDL_AtomicExchange32(volatile Uint32 * ptr, Uint32 value);
/** /**
* \fn int SDL_AtomicCompareThenSet32(Uint32 * ptr, Uint32 oldvalue, Uint32 newvalue) * \fn int SDL_AtomicCompareThenSet32(volatile Uint32 * ptr, Uint32 oldvalue, Uint32 newvalue)
* *
* \brief If *ptr == oldvalue then replace the contents of *ptr by new value. * \brief If *ptr == oldvalue then replace the contents of *ptr by new value.
* *
...@@ -113,10 +113,10 @@ extern DECLSPEC Uint32 SDLCALL SDL_AtomicExchange32(Uint32 * ptr, Uint32 value); ...@@ -113,10 +113,10 @@ extern DECLSPEC Uint32 SDLCALL SDL_AtomicExchange32(Uint32 * ptr, Uint32 value);
* \param newvalue is value to be stored at *ptr. * \param newvalue is value to be stored at *ptr.
* *
*/ */
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCompareThenSet32(Uint32 * ptr, extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCompareThenSet32(volatile Uint32 * ptr,
Uint32 oldvalue, Uint32 newvalue); Uint32 oldvalue, Uint32 newvalue);
/** /**
* \fn SDL_bool SDL_AtomicTestThenSet32(Uint32 * ptr); * \fn SDL_bool SDL_AtomicTestThenSet32(volatile Uint32 * ptr);
* *
* \brief Check to see if *ptr == 0 and set it to non-zero. * \brief Check to see if *ptr == 0 and set it to non-zero.
* *
...@@ -126,18 +126,18 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCompareThenSet32(Uint32 * ptr, ...@@ -126,18 +126,18 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCompareThenSet32(Uint32 * ptr,
* \param ptr points to the value to be tested and set. * \param ptr points to the value to be tested and set.
* *
*/ */
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTestThenSet32(Uint32 * ptr); extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTestThenSet32(volatile Uint32 * ptr);
/** /**
* \fn void SDL_AtomicClear32(Uint32 * ptr); * \fn void SDL_AtomicClear32(volatile Uint32 * ptr);
* *
* \brief set the value pointed to by ptr to be zero. * \brief set the value pointed to by ptr to be zero.
* *
* \param ptr address of the value to be set to zero * \param ptr address of the value to be set to zero
* *
*/ */
extern DECLSPEC void SDLCALL SDL_AtomicClear32(Uint32 * ptr); extern DECLSPEC void SDLCALL SDL_AtomicClear32(volatile Uint32 * ptr);
/** /**
* \fn Uint32 SDL_AtomicFetchThenIncrement32(Uint32 * ptr); * \fn Uint32 SDL_AtomicFetchThenIncrement32(volatile Uint32 * ptr);
* *
* \brief fetch the current value of *ptr and then increment that * \brief fetch the current value of *ptr and then increment that
* value in place. * value in place.
...@@ -147,9 +147,9 @@ extern DECLSPEC void SDLCALL SDL_AtomicClear32(Uint32 * ptr); ...@@ -147,9 +147,9 @@ extern DECLSPEC void SDLCALL SDL_AtomicClear32(Uint32 * ptr);
* \param ptr address of the value to fetch and increment * \param ptr address of the value to fetch and increment
* *
*/ */
extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenIncrement32(Uint32 * ptr); extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenIncrement32(volatile Uint32 * ptr);
/** /**
* \fn Uint32 SDL_AtomicFetchThenDecrement32(Uint32 * ptr); * \fn Uint32 SDL_AtomicFetchThenDecrement32(volatile Uint32 * ptr);
* *
* \brief fetch *ptr and then decrement the value in place. * \brief fetch *ptr and then decrement the value in place.
* *
...@@ -158,9 +158,9 @@ extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenIncrement32(Uint32 * ptr); ...@@ -158,9 +158,9 @@ extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenIncrement32(Uint32 * ptr);
* \param ptr address of the value to fetch and drement * \param ptr address of the value to fetch and drement
* *
*/ */
extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenDecrement32(Uint32 * ptr); extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenDecrement32(volatile Uint32 * ptr);
/** /**
* \fn Uint32 SDL_AtomicFetchThenAdd32(Uint32 * ptr, Uint32 value); * \fn Uint32 SDL_AtomicFetchThenAdd32(volatile Uint32 * ptr, Uint32 value);
* *
* \brief fetch the current value at ptr and then add value to *ptr. * \brief fetch the current value at ptr and then add value to *ptr.
* *
...@@ -170,9 +170,9 @@ extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenDecrement32(Uint32 * ptr); ...@@ -170,9 +170,9 @@ extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenDecrement32(Uint32 * ptr);
* \param value the value to add to *ptr. * \param value the value to add to *ptr.
* *
*/ */
extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenAdd32(Uint32 * ptr, Uint32 value); extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenAdd32(volatile Uint32 * ptr, Uint32 value);
/** /**
* \fn Uint32 SDL_AtomicFetchThenSubtract32(Uint32 * ptr, Uint32 value); * \fn Uint32 SDL_AtomicFetchThenSubtract32(volatile Uint32 * ptr, Uint32 value);
* *
* \brief Fetch *ptr and then subtract value from it. * \brief Fetch *ptr and then subtract value from it.
* *
...@@ -182,9 +182,9 @@ extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenAdd32(Uint32 * ptr, Uint32 val ...@@ -182,9 +182,9 @@ extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenAdd32(Uint32 * ptr, Uint32 val
* \param value the value to subtract from *ptr. * \param value the value to subtract from *ptr.
* *
*/ */
extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenSubtract32(Uint32 * ptr, Uint32 value); extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenSubtract32(volatile Uint32 * ptr, Uint32 value);
/** /**
* \fn Uint32 SDL_AtomicIncrementThenFetch32(Uint32 * ptr); * \fn Uint32 SDL_AtomicIncrementThenFetch32(volatile Uint32 * ptr);
* *
* \brief Add one to the data pointed to by ptr and return that value. * \brief Add one to the data pointed to by ptr and return that value.
* *
...@@ -193,9 +193,9 @@ extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenSubtract32(Uint32 * ptr, Uint3 ...@@ -193,9 +193,9 @@ extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenSubtract32(Uint32 * ptr, Uint3
* \param ptr address of the data to increment. * \param ptr address of the data to increment.
* *
*/ */
extern DECLSPEC Uint32 SDLCALL SDL_AtomicIncrementThenFetch32(Uint32 * ptr); extern DECLSPEC Uint32 SDLCALL SDL_AtomicIncrementThenFetch32(volatile Uint32 * ptr);
/** /**
* \fn Uint32 SDL_AtomicDecrementThenFetch32(Uint32 * ptr); * \fn Uint32 SDL_AtomicDecrementThenFetch32(volatile Uint32 * ptr);
* *
* \brief Subtract one from data pointed to by ptr and return the new value. * \brief Subtract one from data pointed to by ptr and return the new value.
* *
...@@ -204,9 +204,9 @@ extern DECLSPEC Uint32 SDLCALL SDL_AtomicIncrementThenFetch32(Uint32 * ptr); ...@@ -204,9 +204,9 @@ extern DECLSPEC Uint32 SDLCALL SDL_AtomicIncrementThenFetch32(Uint32 * ptr);
* \param ptr The address of the data to decrement. * \param ptr The address of the data to decrement.
* *
*/ */
extern DECLSPEC Uint32 SDLCALL SDL_AtomicDecrementThenFetch32(Uint32 * ptr); extern DECLSPEC Uint32 SDLCALL SDL_AtomicDecrementThenFetch32(volatile Uint32 * ptr);
/** /**
* \fn Uint32 SDL_AtomicAddThenFetch32(Uint32 * ptr, Uint32 value); * \fn Uint32 SDL_AtomicAddThenFetch32(volatile Uint32 * ptr, Uint32 value);
* *
* \brief Add value to the data pointed to by ptr and return result. * \brief Add value to the data pointed to by ptr and return result.
* *
...@@ -216,9 +216,9 @@ extern DECLSPEC Uint32 SDLCALL SDL_AtomicDecrementThenFetch32(Uint32 * ptr); ...@@ -216,9 +216,9 @@ extern DECLSPEC Uint32 SDLCALL SDL_AtomicDecrementThenFetch32(Uint32 * ptr);
* \param value The value to be added. * \param value The value to be added.
* *
*/ */
extern DECLSPEC Uint32 SDLCALL SDL_AtomicAddThenFetch32(Uint32 * ptr, Uint32 value); extern DECLSPEC Uint32 SDLCALL SDL_AtomicAddThenFetch32(volatile Uint32 * ptr, Uint32 value);
/** /**
* \fn Uint32 SDL_AtomicSubtractThenFetch32(Uint32 * ptr, Uint32 value); * \fn Uint32 SDL_AtomicSubtractThenFetch32(volatile Uint32 * ptr, Uint32 value);
* *
* \brief Subtract value from the data pointed to by ptr and return the result. * \brief Subtract value from the data pointed to by ptr and return the result.
* *
...@@ -228,24 +228,24 @@ extern DECLSPEC Uint32 SDLCALL SDL_AtomicAddThenFetch32(Uint32 * ptr, Uint32 val ...@@ -228,24 +228,24 @@ extern DECLSPEC Uint32 SDLCALL SDL_AtomicAddThenFetch32(Uint32 * ptr, Uint32 val
* \param value The value to be subtracted. * \param value The value to be subtracted.
* *
*/ */
extern DECLSPEC Uint32 SDLCALL SDL_AtomicSubtractThenFetch32(Uint32 * ptr, Uint32 value); extern DECLSPEC Uint32 SDLCALL SDL_AtomicSubtractThenFetch32(volatile Uint32 * ptr, Uint32 value);
/* 64 bit atomic operations */ /* 64 bit atomic operations */
#ifdef SDL_HAS_64BIT_TYPE #ifdef SDL_HAS_64BIT_TYPE
extern DECLSPEC Uint64 SDLCALL SDL_AtomicExchange64(Uint64 * ptr, Uint64 value); extern DECLSPEC Uint64 SDLCALL SDL_AtomicExchange64(volatile Uint64 * ptr, Uint64 value);
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCompareThenSet64(Uint64 * ptr, extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCompareThenSet64(volatile Uint64 * ptr,
Uint64 oldvalue, Uint64 newvalue); Uint64 oldvalue, Uint64 newvalue);
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTestThenSet64(Uint64 * ptr); extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTestThenSet64(volatile Uint64 * ptr);
extern DECLSPEC void SDLCALL SDL_AtomicClear64(Uint64 * ptr); extern DECLSPEC void SDLCALL SDL_AtomicClear64(volatile Uint64 * ptr);
extern DECLSPEC Uint64 SDLCALL SDL_AtomicFetchThenIncrement64(Uint64 * ptr); extern DECLSPEC Uint64 SDLCALL SDL_AtomicFetchThenIncrement64(volatile Uint64 * ptr);
extern DECLSPEC Uint64 SDLCALL SDL_AtomicFetchThenDecrement64(Uint64 * ptr); extern DECLSPEC Uint64 SDLCALL SDL_AtomicFetchThenDecrement64(volatile Uint64 * ptr);
extern DECLSPEC Uint64 SDLCALL SDL_AtomicFetchThenAdd64(Uint64 * ptr, Uint64 value); extern DECLSPEC Uint64 SDLCALL SDL_AtomicFetchThenAdd64(volatile Uint64 * ptr, Uint64 value);
extern DECLSPEC Uint64 SDLCALL SDL_AtomicFetchThenSubtract64(Uint64 * ptr, Uint64 value); extern DECLSPEC Uint64 SDLCALL SDL_AtomicFetchThenSubtract64(volatile Uint64 * ptr, Uint64 value);
extern DECLSPEC Uint64 SDLCALL SDL_AtomicIncrementThenFetch64(Uint64 * ptr); extern DECLSPEC Uint64 SDLCALL SDL_AtomicIncrementThenFetch64(volatile Uint64 * ptr);
extern DECLSPEC Uint64 SDLCALL SDL_AtomicDecrementThenFetch64(Uint64 * ptr); extern DECLSPEC Uint64 SDLCALL SDL_AtomicDecrementThenFetch64(volatile Uint64 * ptr);
extern DECLSPEC Uint64 SDLCALL SDL_AtomicAddThenFetch64(Uint64 * ptr, Uint64 value); extern DECLSPEC Uint64 SDLCALL SDL_AtomicAddThenFetch64(volatile Uint64 * ptr, Uint64 value);
extern DECLSPEC Uint64 SDLCALL SDL_AtomicSubtractThenFetch64(Uint64 * ptr, Uint64 value); extern DECLSPEC Uint64 SDLCALL SDL_AtomicSubtractThenFetch64(volatile Uint64 * ptr, Uint64 value);
#endif /* SDL_HAS_64BIT_TYPE */ #endif /* SDL_HAS_64BIT_TYPE */
/* Ends C function definitions when using C++ */ /* Ends C function definitions when using C++ */
......
...@@ -165,7 +165,7 @@ privateUnlock() ...@@ -165,7 +165,7 @@ privateUnlock()
/* 8 bit atomic operations */ /* 8 bit atomic operations */
Uint8 Uint8
SDL_AtomicExchange8(Uint8 * ptr, Uint8 value) SDL_AtomicExchange8(volatile Uint8 * ptr, Uint8 value)
{ {
#ifdef nativeExchange8 #ifdef nativeExchange8
return nativeExchange8(ptr, value); return nativeExchange8(ptr, value);
...@@ -182,7 +182,7 @@ SDL_AtomicExchange8(Uint8 * ptr, Uint8 value) ...@@ -182,7 +182,7 @@ SDL_AtomicExchange8(Uint8 * ptr, Uint8 value)
} }
SDL_bool SDL_bool
SDL_AtomicCompareThenSet8(Uint8 * ptr, Uint8 oldvalue, Uint8 newvalue) SDL_AtomicCompareThenSet8(volatile Uint8 * ptr, Uint8 oldvalue, Uint8 newvalue)
{ {
#ifdef nativeCompareThenSet8 #ifdef nativeCompareThenSet8
return (SDL_bool)nativeCompareThenSet8(ptr, oldvalue, newvalue); return (SDL_bool)nativeCompareThenSet8(ptr, oldvalue, newvalue);
...@@ -202,7 +202,7 @@ SDL_AtomicCompareThenSet8(Uint8 * ptr, Uint8 oldvalue, Uint8 newvalue) ...@@ -202,7 +202,7 @@ SDL_AtomicCompareThenSet8(Uint8 * ptr, Uint8 oldvalue, Uint8 newvalue)
} }
SDL_bool SDL_bool
SDL_AtomicTestThenSet8(Uint8 * ptr) SDL_AtomicTestThenSet8(volatile Uint8 * ptr)
{ {
#ifdef nativeTestThenSet8 #ifdef nativeTestThenSet8
return (SDL_bool)nativeTestThenSet8(ptr); return (SDL_bool)nativeTestThenSet8(ptr);
...@@ -222,7 +222,7 @@ SDL_AtomicTestThenSet8(Uint8 * ptr) ...@@ -222,7 +222,7 @@ SDL_AtomicTestThenSet8(Uint8 * ptr)
} }
void void
SDL_AtomicClear8(Uint8 * ptr) SDL_AtomicClear8(volatile Uint8 * ptr)
{ {
#ifdef nativeClear8 #ifdef nativeClear8
nativeClear8(ptr); nativeClear8(ptr);
...@@ -236,7 +236,7 @@ SDL_AtomicClear8(Uint8 * ptr) ...@@ -236,7 +236,7 @@ SDL_AtomicClear8(Uint8 * ptr)
} }
Uint8 Uint8
SDL_AtomicFetchThenIncrement8(Uint8 * ptr) SDL_AtomicFetchThenIncrement8(volatile Uint8 * ptr)
{ {
#ifdef nativeFetchThenIncrement8 #ifdef nativeFetchThenIncrement8
return nativeFetchThenIncrement8(ptr); return nativeFetchThenIncrement8(ptr);
...@@ -253,7 +253,7 @@ SDL_AtomicFetchThenIncrement8(Uint8 * ptr) ...@@ -253,7 +253,7 @@ SDL_AtomicFetchThenIncrement8(Uint8 * ptr)
} }
Uint8 Uint8
SDL_AtomicFetchThenDecrement8(Uint8 * ptr) SDL_AtomicFetchThenDecrement8(volatile Uint8 * ptr)
{ {
#ifdef nativeFetchThenDecrement8 #ifdef nativeFetchThenDecrement8
return nativeFetchThenDecrement8(ptr); return nativeFetchThenDecrement8(ptr);
...@@ -270,7 +270,7 @@ SDL_AtomicFetchThenDecrement8(Uint8 * ptr) ...@@ -270,7 +270,7 @@ SDL_AtomicFetchThenDecrement8(Uint8 * ptr)
} }
Uint8 Uint8
SDL_AtomicFetchThenAdd8(Uint8 * ptr, Uint8 value) SDL_AtomicFetchThenAdd8(volatile Uint8 * ptr, Uint8 value)
{ {
#ifdef nativeFetchThenAdd8 #ifdef nativeFetchThenAdd8
return nativeFetchThenAdd8(ptr, value); return nativeFetchThenAdd8(ptr, value);
...@@ -287,7 +287,7 @@ SDL_AtomicFetchThenAdd8(Uint8 * ptr, Uint8 value) ...@@ -287,7 +287,7 @@ SDL_AtomicFetchThenAdd8(Uint8 * ptr, Uint8 value)
} }
Uint8 Uint8
SDL_AtomicFetchThenSubtract8(Uint8 * ptr, Uint8 value) SDL_AtomicFetchThenSubtract8(volatile Uint8 * ptr, Uint8 value)
{ {
#ifdef nativeFetchThenSubtract8 #ifdef nativeFetchThenSubtract8
return nativeFetchThenSubtract8(ptr, value); return nativeFetchThenSubtract8(ptr, value);
...@@ -304,7 +304,7 @@ SDL_AtomicFetchThenSubtract8(Uint8 * ptr, Uint8 value) ...@@ -304,7 +304,7 @@ SDL_AtomicFetchThenSubtract8(Uint8 * ptr, Uint8 value)
} }
Uint8 Uint8
SDL_AtomicIncrementThenFetch8(Uint8 * ptr) SDL_AtomicIncrementThenFetch8(volatile Uint8 * ptr)
{ {
#ifdef nativeIncrementThenFetch8 #ifdef nativeIncrementThenFetch8
return nativeIncrementThenFetch8(ptr); return nativeIncrementThenFetch8(ptr);
...@@ -321,7 +321,7 @@ SDL_AtomicIncrementThenFetch8(Uint8 * ptr) ...@@ -321,7 +321,7 @@ SDL_AtomicIncrementThenFetch8(Uint8 * ptr)
} }
Uint8 Uint8
SDL_AtomicDecrementThenFetch8(Uint8 * ptr) SDL_AtomicDecrementThenFetch8(volatile Uint8 * ptr)
{ {
#ifdef nativeDecrementThenFetch8 #ifdef nativeDecrementThenFetch8
return nativeDecrementThenFetch8(ptr); return nativeDecrementThenFetch8(ptr);
...@@ -338,7 +338,7 @@ SDL_AtomicDecrementThenFetch8(Uint8 * ptr) ...@@ -338,7 +338,7 @@ SDL_AtomicDecrementThenFetch8(Uint8 * ptr)
} }
Uint8 Uint8
SDL_AtomicAddThenFetch8(Uint8 * ptr, Uint8 value) SDL_AtomicAddThenFetch8(volatile Uint8 * ptr, Uint8 value)
{ {
#ifdef nativeAddThenFetch8 #ifdef nativeAddThenFetch8
return nativeAddThenFetch8(ptr, value); return nativeAddThenFetch8(ptr, value);
...@@ -355,7 +355,7 @@ SDL_AtomicAddThenFetch8(Uint8 * ptr, Uint8 value) ...@@ -355,7 +355,7 @@ SDL_AtomicAddThenFetch8(Uint8 * ptr, Uint8 value)
} }
Uint8 Uint8
SDL_AtomicSubtractThenFetch8(Uint8 * ptr, Uint8 value) SDL_AtomicSubtractThenFetch8(volatile Uint8 * ptr, Uint8 value)
{ {
#ifdef nativeSubtractThenFetch8 #ifdef nativeSubtractThenFetch8
return nativeSubtractThenFetch8(ptr, value); return nativeSubtractThenFetch8(ptr, value);
...@@ -374,7 +374,7 @@ SDL_AtomicSubtractThenFetch8(Uint8 * ptr, Uint8 value) ...@@ -374,7 +374,7 @@ SDL_AtomicSubtractThenFetch8(Uint8 * ptr, Uint8 value)
/* 16 bit atomic operations */ /* 16 bit atomic operations */
Uint16 Uint16
SDL_AtomicExchange16(Uint16 * ptr, Uint16 value) SDL_AtomicExchange16(volatile Uint16 * ptr, Uint16 value)
{ {
#ifdef nativeExchange16 #ifdef nativeExchange16
return nativeExchange16(ptr, value); return nativeExchange16(ptr, value);
...@@ -391,7 +391,7 @@ SDL_AtomicExchange16(Uint16 * ptr, Uint16 value) ...@@ -391,7 +391,7 @@ SDL_AtomicExchange16(Uint16 * ptr, Uint16 value)
} }
SDL_bool SDL_bool
SDL_AtomicCompareThenSet16(Uint16 * ptr, Uint16 oldvalue, Uint16 newvalue) SDL_AtomicCompareThenSet16(volatile Uint16 * ptr, Uint16 oldvalue, Uint16 newvalue)
{ {
#ifdef nativeCompareThenSet16 #ifdef nativeCompareThenSet16
return (SDL_bool)nativeCompareThenSet16(ptr, oldvalue, newvalue); return (SDL_bool)nativeCompareThenSet16(ptr, oldvalue, newvalue);
...@@ -411,7 +411,7 @@ SDL_AtomicCompareThenSet16(Uint16 * ptr, Uint16 oldvalue, Uint16 newvalue) ...@@ -411,7 +411,7 @@ SDL_AtomicCompareThenSet16(Uint16 * ptr, Uint16 oldvalue, Uint16 newvalue)
} }
SDL_bool SDL_bool
SDL_AtomicTestThenSet16(Uint16 * ptr) SDL_AtomicTestThenSet16(volatile Uint16 * ptr)
{ {
#ifdef nativeTestThenSet16 #ifdef nativeTestThenSet16
return (SDL_bool)nativeTestThenSet16(ptr); return (SDL_bool)nativeTestThenSet16(ptr);
...@@ -431,7 +431,7 @@ SDL_AtomicTestThenSet16(Uint16 * ptr) ...@@ -431,7 +431,7 @@ SDL_AtomicTestThenSet16(Uint16 * ptr)
} }
void void
SDL_AtomicClear16(Uint16 * ptr) SDL_AtomicClear16(volatile Uint16 * ptr)
{ {
#ifdef nativeClear16 #ifdef nativeClear16
nativeClear16(ptr); nativeClear16(ptr);
...@@ -445,7 +445,7 @@ SDL_AtomicClear16(Uint16 * ptr) ...@@ -445,7 +445,7 @@ SDL_AtomicClear16(Uint16 * ptr)
} }
Uint16 Uint16
SDL_AtomicFetchThenIncrement16(Uint16 * ptr) SDL_AtomicFetchThenIncrement16(volatile Uint16 * ptr)
{ {
#ifdef nativeFetchThenIncrement16 #ifdef nativeFetchThenIncrement16
return nativeFetchThenIncrement16(ptr); return nativeFetchThenIncrement16(ptr);
...@@ -462,7 +462,7 @@ SDL_AtomicFetchThenIncrement16(Uint16 * ptr) ...@@ -462,7 +462,7 @@ SDL_AtomicFetchThenIncrement16(Uint16 * ptr)
} }
Uint16 Uint16
SDL_AtomicFetchThenDecrement16(Uint16 * ptr) SDL_AtomicFetchThenDecrement16(volatile Uint16 * ptr)
{ {
#ifdef nativeFetchThenDecrement16 #ifdef nativeFetchThenDecrement16
return nativeFetchThenDecrement16(ptr); return nativeFetchThenDecrement16(ptr);
...@@ -479,7 +479,7 @@ SDL_AtomicFetchThenDecrement16(Uint16 * ptr) ...@@ -479,7 +479,7 @@ SDL_AtomicFetchThenDecrement16(Uint16 * ptr)
} }
Uint16 Uint16
SDL_AtomicFetchThenAdd16(Uint16 * ptr, Uint16 value) SDL_AtomicFetchThenAdd16(volatile Uint16 * ptr, Uint16 value)
{ {
#ifdef nativeFetchThenAdd16 #ifdef nativeFetchThenAdd16
return nativeFetchThenAdd16(ptr, value); return nativeFetchThenAdd16(ptr, value);
...@@ -496,7 +496,7 @@ SDL_AtomicFetchThenAdd16(Uint16 * ptr, Uint16 value) ...@@ -496,7 +496,7 @@ SDL_AtomicFetchThenAdd16(Uint16 * ptr, Uint16 value)
} }
Uint16 Uint16
SDL_AtomicFetchThenSubtract16(Uint16 * ptr, Uint16 value) SDL_AtomicFetchThenSubtract16(volatile Uint16 * ptr, Uint16 value)
{ {
#ifdef nativeFetchThenSubtract16 #ifdef nativeFetchThenSubtract16
return nativeFetchThenSubtract16(ptr, value); return nativeFetchThenSubtract16(ptr, value);
...@@ -513,7 +513,7 @@ SDL_AtomicFetchThenSubtract16(Uint16 * ptr, Uint16 value) ...@@ -513,7 +513,7 @@ SDL_AtomicFetchThenSubtract16(Uint16 * ptr, Uint16 value)
} }
Uint16 Uint16
SDL_AtomicIncrementThenFetch16(Uint16 * ptr) SDL_AtomicIncrementThenFetch16(volatile Uint16 * ptr)
{ {
#ifdef nativeIncrementThenFetch16 #ifdef nativeIncrementThenFetch16
return nativeIncrementThenFetch16(ptr); return nativeIncrementThenFetch16(ptr);
...@@ -530,7 +530,7 @@ SDL_AtomicIncrementThenFetch16(Uint16 * ptr) ...@@ -530,7 +530,7 @@ SDL_AtomicIncrementThenFetch16(Uint16 * ptr)
} }
Uint16 Uint16
SDL_AtomicDecrementThenFetch16(Uint16 * ptr) SDL_AtomicDecrementThenFetch16(volatile Uint16 * ptr)
{ {
#ifdef nativeDecrementThenFetch16 #ifdef nativeDecrementThenFetch16
return nativeDecrementThenFetch16(ptr); return nativeDecrementThenFetch16(ptr);
...@@ -547,7 +547,7 @@ SDL_AtomicDecrementThenFetch16(Uint16 * ptr) ...@@ -547,7 +547,7 @@ SDL_AtomicDecrementThenFetch16(Uint16 * ptr)
} }
Uint16 Uint16
SDL_AtomicAddThenFetch16(Uint16 * ptr, Uint16 value) SDL_AtomicAddThenFetch16(volatile Uint16 * ptr, Uint16 value)
{ {
#ifdef nativeAddThenFetch16 #ifdef nativeAddThenFetch16
return nativeAddThenFetch16(ptr, value); return nativeAddThenFetch16(ptr, value);
...@@ -564,7 +564,7 @@ SDL_AtomicAddThenFetch16(Uint16 * ptr, Uint16 value) ...@@ -564,7 +564,7 @@ SDL_AtomicAddThenFetch16(Uint16 * ptr, Uint16 value)
} }
Uint16 Uint16
SDL_AtomicSubtractThenFetch16(Uint16 * ptr, Uint16 value) SDL_AtomicSubtractThenFetch16(volatile Uint16 * ptr, Uint16 value)
{ {
#ifdef nativeSubtractThenFetch16 #ifdef nativeSubtractThenFetch16
return nativeSubtractThenFetch16(ptr, value); return nativeSubtractThenFetch16(ptr, value);
...@@ -583,7 +583,7 @@ SDL_AtomicSubtractThenFetch16(Uint16 * ptr, Uint16 value) ...@@ -583,7 +583,7 @@ SDL_AtomicSubtractThenFetch16(Uint16 * ptr, Uint16 value)
/* 32 bit atomic operations */ /* 32 bit atomic operations */
Uint32 Uint32
SDL_AtomicExchange32(Uint32 * ptr, Uint32 value) SDL_AtomicExchange32(volatile Uint32 * ptr, Uint32 value)
{ {
#ifdef nativeExchange32 #ifdef nativeExchange32
return nativeExchange32(ptr, value); return nativeExchange32(ptr, value);
...@@ -600,7 +600,7 @@ SDL_AtomicExchange32(Uint32 * ptr, Uint32 value) ...@@ -600,7 +600,7 @@ SDL_AtomicExchange32(Uint32 * ptr, Uint32 value)
} }
SDL_bool SDL_bool
SDL_AtomicCompareThenSet32(Uint32 * ptr, Uint32 oldvalue, Uint32 newvalue) SDL_AtomicCompareThenSet32(volatile Uint32 * ptr, Uint32 oldvalue, Uint32 newvalue)
{ {
#ifdef nativeCompareThenSet32 #ifdef nativeCompareThenSet32
return (SDL_bool)nativeCompareThenSet32(ptr, oldvalue, newvalue); return (SDL_bool)nativeCompareThenSet32(ptr, oldvalue, newvalue);
...@@ -620,7 +620,7 @@ SDL_AtomicCompareThenSet32(Uint32 * ptr, Uint32 oldvalue, Uint32 newvalue) ...@@ -620,7 +620,7 @@ SDL_AtomicCompareThenSet32(Uint32 * ptr, Uint32 oldvalue, Uint32 newvalue)
} }
SDL_bool SDL_bool
SDL_AtomicTestThenSet32(Uint32 * ptr) SDL_AtomicTestThenSet32(volatile Uint32 * ptr)
{ {
#ifdef nativeTestThenSet32 #ifdef nativeTestThenSet32
return (SDL_bool)nativeTestThenSet32(ptr); return (SDL_bool)nativeTestThenSet32(ptr);
...@@ -640,7 +640,7 @@ SDL_AtomicTestThenSet32(Uint32 * ptr) ...@@ -640,7 +640,7 @@ SDL_AtomicTestThenSet32(Uint32 * ptr)
} }
void void
SDL_AtomicClear32(Uint32 * ptr) SDL_AtomicClear32(volatile Uint32 * ptr)
{ {
#ifdef nativeClear32 #ifdef nativeClear32
nativeClear32(ptr); nativeClear32(ptr);
...@@ -654,7 +654,7 @@ SDL_AtomicClear32(Uint32 * ptr) ...@@ -654,7 +654,7 @@ SDL_AtomicClear32(Uint32 * ptr)
} }
Uint32 Uint32
SDL_AtomicFetchThenIncrement32(Uint32 * ptr) SDL_AtomicFetchThenIncrement32(volatile Uint32 * ptr)
{ {
#ifdef nativeFetchThenIncrement32 #ifdef nativeFetchThenIncrement32
return nativeFetchThenIncrement32(ptr); return nativeFetchThenIncrement32(ptr);
...@@ -671,7 +671,7 @@ SDL_AtomicFetchThenIncrement32(Uint32 * ptr) ...@@ -671,7 +671,7 @@ SDL_AtomicFetchThenIncrement32(Uint32 * ptr)
} }
Uint32 Uint32
SDL_AtomicFetchThenDecrement32(Uint32 * ptr) SDL_AtomicFetchThenDecrement32(volatile Uint32 * ptr)
{ {
#ifdef nativeFetchThenDecrement32 #ifdef nativeFetchThenDecrement32
return nativeFetchThenDecrement32(ptr); return nativeFetchThenDecrement32(ptr);
...@@ -688,7 +688,7 @@ SDL_AtomicFetchThenDecrement32(Uint32 * ptr) ...@@ -688,7 +688,7 @@ SDL_AtomicFetchThenDecrement32(Uint32 * ptr)
} }
Uint32 Uint32
SDL_AtomicFetchThenAdd32(Uint32 * ptr, Uint32 value) SDL_AtomicFetchThenAdd32(volatile Uint32 * ptr, Uint32 value)
{ {
#ifdef nativeFetchThenAdd32 #ifdef nativeFetchThenAdd32
return nativeFetchThenAdd32(ptr, value); return nativeFetchThenAdd32(ptr, value);
...@@ -705,7 +705,7 @@ SDL_AtomicFetchThenAdd32(Uint32 * ptr, Uint32 value) ...@@ -705,7 +705,7 @@ SDL_AtomicFetchThenAdd32(Uint32 * ptr, Uint32 value)
} }
Uint32 Uint32
SDL_AtomicFetchThenSubtract32(Uint32 * ptr, Uint32 value) SDL_AtomicFetchThenSubtract32(volatile Uint32 * ptr, Uint32 value)
{ {
#ifdef nativeFetchThenSubtract32 #ifdef nativeFetchThenSubtract32
return nativeFetchThenSubtract32(ptr, value); return nativeFetchThenSubtract32(ptr, value);
...@@ -722,7 +722,7 @@ SDL_AtomicFetchThenSubtract32(Uint32 * ptr, Uint32 value) ...@@ -722,7 +722,7 @@ SDL_AtomicFetchThenSubtract32(Uint32 * ptr, Uint32 value)
} }
Uint32 Uint32
SDL_AtomicIncrementThenFetch32(Uint32 * ptr) SDL_AtomicIncrementThenFetch32(volatile Uint32 * ptr)
{ {
#ifdef nativeIncrementThenFetch32 #ifdef nativeIncrementThenFetch32
return nativeIncrementThenFetch32(ptr); return nativeIncrementThenFetch32(ptr);
...@@ -739,7 +739,7 @@ SDL_AtomicIncrementThenFetch32(Uint32 * ptr) ...@@ -739,7 +739,7 @@ SDL_AtomicIncrementThenFetch32(Uint32 * ptr)
} }
Uint32 Uint32
SDL_AtomicDecrementThenFetch32(Uint32 * ptr) SDL_AtomicDecrementThenFetch32(volatile Uint32 * ptr)
{ {
#ifdef nativeDecrementThenFetch32 #ifdef nativeDecrementThenFetch32
return nativeDecrementThenFetch32(ptr); return nativeDecrementThenFetch32(ptr);
...@@ -756,7 +756,7 @@ SDL_AtomicDecrementThenFetch32(Uint32 * ptr) ...@@ -756,7 +756,7 @@ SDL_AtomicDecrementThenFetch32(Uint32 * ptr)
} }
Uint32 Uint32
SDL_AtomicAddThenFetch32(Uint32 * ptr, Uint32 value) SDL_AtomicAddThenFetch32(volatile Uint32 * ptr, Uint32 value)
{ {
#ifdef nativeAddThenFetch32 #ifdef nativeAddThenFetch32
return nativeAddThenFetch32(ptr, value); return nativeAddThenFetch32(ptr, value);
...@@ -773,7 +773,7 @@ SDL_AtomicAddThenFetch32(Uint32 * ptr, Uint32 value) ...@@ -773,7 +773,7 @@ SDL_AtomicAddThenFetch32(Uint32 * ptr, Uint32 value)
} }
Uint32 Uint32
SDL_AtomicSubtractThenFetch32(Uint32 * ptr, Uint32 value) SDL_AtomicSubtractThenFetch32(volatile Uint32 * ptr, Uint32 value)
{ {
#ifdef nativeSubtractThenFetch32 #ifdef nativeSubtractThenFetch32
return nativeSubtractThenFetch32(ptr, value); return nativeSubtractThenFetch32(ptr, value);
...@@ -793,7 +793,7 @@ SDL_AtomicSubtractThenFetch32(Uint32 * ptr, Uint32 value) ...@@ -793,7 +793,7 @@ SDL_AtomicSubtractThenFetch32(Uint32 * ptr, Uint32 value)
#ifdef SDL_HAS_64BIT_TYPE #ifdef SDL_HAS_64BIT_TYPE
Uint64 Uint64
SDL_AtomicExchange64(Uint64 * ptr, Uint64 value) SDL_AtomicExchange64(volatile Uint64 * ptr, Uint64 value)
{ {
#ifdef nativeExchange64 #ifdef nativeExchange64
return nativeExchange64(ptr, value); return nativeExchange64(ptr, value);
...@@ -810,7 +810,7 @@ SDL_AtomicExchange64(Uint64 * ptr, Uint64 value) ...@@ -810,7 +810,7 @@ SDL_AtomicExchange64(Uint64 * ptr, Uint64 value)
} }
SDL_bool SDL_bool
SDL_AtomicCompareThenSet64(Uint64 * ptr, Uint64 oldvalue, Uint64 newvalue) SDL_AtomicCompareThenSet64(volatile Uint64 * ptr, Uint64 oldvalue, Uint64 newvalue)
{ {
#ifdef nativeCompareThenSet64 #ifdef nativeCompareThenSet64
return (SDL_bool)nativeCompareThenSet64(ptr, oldvalue, newvalue); return (SDL_bool)nativeCompareThenSet64(ptr, oldvalue, newvalue);
...@@ -830,7 +830,7 @@ SDL_AtomicCompareThenSet64(Uint64 * ptr, Uint64 oldvalue, Uint64 newvalue) ...@@ -830,7 +830,7 @@ SDL_AtomicCompareThenSet64(Uint64 * ptr, Uint64 oldvalue, Uint64 newvalue)
} }
SDL_bool SDL_bool
SDL_AtomicTestThenSet64(Uint64 * ptr) SDL_AtomicTestThenSet64(volatile Uint64 * ptr)
{ {
#ifdef nativeTestThenSet64 #ifdef nativeTestThenSet64
return (SDL_bool)nativeTestThenSet64(ptr); return (SDL_bool)nativeTestThenSet64(ptr);
...@@ -850,7 +850,7 @@ SDL_AtomicTestThenSet64(Uint64 * ptr) ...@@ -850,7 +850,7 @@ SDL_AtomicTestThenSet64(Uint64 * ptr)
} }
void void
SDL_AtomicClear64(Uint64 * ptr) SDL_AtomicClear64(volatile Uint64 * ptr)
{ {
#ifdef nativeClear64 #ifdef nativeClear64
nativeClear64(ptr); nativeClear64(ptr);
...@@ -864,7 +864,7 @@ SDL_AtomicClear64(Uint64 * ptr) ...@@ -864,7 +864,7 @@ SDL_AtomicClear64(Uint64 * ptr)
} }
Uint64 Uint64
SDL_AtomicFetchThenIncrement64(Uint64 * ptr) SDL_AtomicFetchThenIncrement64(volatile Uint64 * ptr)
{ {
#ifdef nativeFetchThenIncrement64 #ifdef nativeFetchThenIncrement64
return nativeFetchThenIncrement64(ptr); return nativeFetchThenIncrement64(ptr);
...@@ -881,7 +881,7 @@ SDL_AtomicFetchThenIncrement64(Uint64 * ptr) ...@@ -881,7 +881,7 @@ SDL_AtomicFetchThenIncrement64(Uint64 * ptr)
} }
Uint64 Uint64
SDL_AtomicFetchThenDecrement64(Uint64 * ptr) SDL_AtomicFetchThenDecrement64(volatile Uint64 * ptr)
{ {
#ifdef nativeFetchThenDecrement64 #ifdef nativeFetchThenDecrement64
return nativeFetchThenDecrement64(ptr); return nativeFetchThenDecrement64(ptr);
...@@ -898,7 +898,7 @@ SDL_AtomicFetchThenDecrement64(Uint64 * ptr) ...@@ -898,7 +898,7 @@ SDL_AtomicFetchThenDecrement64(Uint64 * ptr)
} }
Uint64 Uint64
SDL_AtomicFetchThenAdd64(Uint64 * ptr, Uint64 value) SDL_AtomicFetchThenAdd64(volatile Uint64 * ptr, Uint64 value)
{ {
#ifdef nativeFetchThenAdd64 #ifdef nativeFetchThenAdd64
return nativeFetchThenAdd64(ptr, value); return nativeFetchThenAdd64(ptr, value);
...@@ -915,7 +915,7 @@ SDL_AtomicFetchThenAdd64(Uint64 * ptr, Uint64 value) ...@@ -915,7 +915,7 @@ SDL_AtomicFetchThenAdd64(Uint64 * ptr, Uint64 value)
} }
Uint64 Uint64
SDL_AtomicFetchThenSubtract64(Uint64 * ptr, Uint64 value) SDL_AtomicFetchThenSubtract64(volatile Uint64 * ptr, Uint64 value)
{ {
#ifdef nativeFetchThenSubtract64 #ifdef nativeFetchThenSubtract64
return nativeFetchThenSubtract64(ptr, value); return nativeFetchThenSubtract64(ptr, value);
...@@ -932,7 +932,7 @@ SDL_AtomicFetchThenSubtract64(Uint64 * ptr, Uint64 value) ...@@ -932,7 +932,7 @@ SDL_AtomicFetchThenSubtract64(Uint64 * ptr, Uint64 value)
} }
Uint64 Uint64
SDL_AtomicIncrementThenFetch64(Uint64 * ptr) SDL_AtomicIncrementThenFetch64(volatile Uint64 * ptr)
{ {
#ifdef nativeIncrementThenFetch64 #ifdef nativeIncrementThenFetch64
return nativeIncrementThenFetch64(ptr); return nativeIncrementThenFetch64(ptr);
...@@ -949,7 +949,7 @@ SDL_AtomicIncrementThenFetch64(Uint64 * ptr) ...@@ -949,7 +949,7 @@ SDL_AtomicIncrementThenFetch64(Uint64 * ptr)
} }
Uint64 Uint64
SDL_AtomicDecrementThenFetch64(Uint64 * ptr) SDL_AtomicDecrementThenFetch64(volatile Uint64 * ptr)
{ {
#ifdef nativeDecrementThenFetch64 #ifdef nativeDecrementThenFetch64
return nativeDecrementThenFetch64(ptr); return nativeDecrementThenFetch64(ptr);
...@@ -966,7 +966,7 @@ SDL_AtomicDecrementThenFetch64(Uint64 * ptr) ...@@ -966,7 +966,7 @@ SDL_AtomicDecrementThenFetch64(Uint64 * ptr)
} }
Uint64 Uint64
SDL_AtomicAddThenFetch64(Uint64 * ptr, Uint64 value) SDL_AtomicAddThenFetch64(volatile Uint64 * ptr, Uint64 value)
{ {
#ifdef nativeAddThenFetch64 #ifdef nativeAddThenFetch64
return nativeAddThenFetch64(ptr, value); return nativeAddThenFetch64(ptr, value);
...@@ -983,7 +983,7 @@ SDL_AtomicAddThenFetch64(Uint64 * ptr, Uint64 value) ...@@ -983,7 +983,7 @@ SDL_AtomicAddThenFetch64(Uint64 * ptr, Uint64 value)
} }
Uint64 Uint64
SDL_AtomicSubtractThenFetch64(Uint64 * ptr, Uint64 value) SDL_AtomicSubtractThenFetch64(volatile Uint64 * ptr, Uint64 value)
{ {
#ifdef nativeSubtractThenFetch64 #ifdef nativeSubtractThenFetch64
return nativeSubtractThenFetch64(ptr, value); return nativeSubtractThenFetch64(ptr, value);
......
...@@ -137,7 +137,7 @@ static Uint32 lock = 0; ...@@ -137,7 +137,7 @@ static Uint32 lock = 0;
/* 8 bit atomic operations */ /* 8 bit atomic operations */
Uint8 Uint8
SDL_AtomicExchange8(Uint8 * ptr, Uint8 value) SDL_AtomicExchange8(volatile Uint8 * ptr, Uint8 value)
{ {
#ifdef nativeExchange8 #ifdef nativeExchange8
return nativeExchange8(ptr, value); return nativeExchange8(ptr, value);
...@@ -154,7 +154,7 @@ SDL_AtomicExchange8(Uint8 * ptr, Uint8 value) ...@@ -154,7 +154,7 @@ SDL_AtomicExchange8(Uint8 * ptr, Uint8 value)
} }
SDL_bool SDL_bool
SDL_AtomicCompareThenSet8(Uint8 * ptr, Uint8 oldvalue, Uint8 newvalue) SDL_AtomicCompareThenSet8(volatile Uint8 * ptr, Uint8 oldvalue, Uint8 newvalue)
{ {
#ifdef nativeCompareThenSet8 #ifdef nativeCompareThenSet8
return (SDL_bool)nativeCompareThenSet8(ptr, oldvalue, newvalue); return (SDL_bool)nativeCompareThenSet8(ptr, oldvalue, newvalue);
...@@ -174,7 +174,7 @@ SDL_AtomicCompareThenSet8(Uint8 * ptr, Uint8 oldvalue, Uint8 newvalue) ...@@ -174,7 +174,7 @@ SDL_AtomicCompareThenSet8(Uint8 * ptr, Uint8 oldvalue, Uint8 newvalue)
} }
SDL_bool SDL_bool
SDL_AtomicTestThenSet8(Uint8 * ptr) SDL_AtomicTestThenSet8(volatile Uint8 * ptr)
{ {
#ifdef nativeTestThenSet8 #ifdef nativeTestThenSet8
return (SDL_bool)nativeTestThenSet8(ptr); return (SDL_bool)nativeTestThenSet8(ptr);
...@@ -194,7 +194,7 @@ SDL_AtomicTestThenSet8(Uint8 * ptr) ...@@ -194,7 +194,7 @@ SDL_AtomicTestThenSet8(Uint8 * ptr)
} }
void void
SDL_AtomicClear8(Uint8 * ptr) SDL_AtomicClear8(volatile Uint8 * ptr)
{ {
#ifdef nativeClear8 #ifdef nativeClear8
nativeClear8(ptr); nativeClear8(ptr);
...@@ -208,7 +208,7 @@ SDL_AtomicClear8(Uint8 * ptr) ...@@ -208,7 +208,7 @@ SDL_AtomicClear8(Uint8 * ptr)
} }
Uint8 Uint8
SDL_AtomicFetchThenIncrement8(Uint8 * ptr) SDL_AtomicFetchThenIncrement8(volatile Uint8 * ptr)
{ {
#ifdef nativeFetchThenIncrement8 #ifdef nativeFetchThenIncrement8
return nativeFetchThenIncrement8(ptr); return nativeFetchThenIncrement8(ptr);
...@@ -225,7 +225,7 @@ SDL_AtomicFetchThenIncrement8(Uint8 * ptr) ...@@ -225,7 +225,7 @@ SDL_AtomicFetchThenIncrement8(Uint8 * ptr)
} }
Uint8 Uint8
SDL_AtomicFetchThenDecrement8(Uint8 * ptr) SDL_AtomicFetchThenDecrement8(volatile Uint8 * ptr)
{ {
#ifdef nativeFetchThenDecrement8 #ifdef nativeFetchThenDecrement8
return nativeFetchThenDecrement8(ptr); return nativeFetchThenDecrement8(ptr);
...@@ -242,7 +242,7 @@ SDL_AtomicFetchThenDecrement8(Uint8 * ptr) ...@@ -242,7 +242,7 @@ SDL_AtomicFetchThenDecrement8(Uint8 * ptr)
} }
Uint8 Uint8
SDL_AtomicFetchThenAdd8(Uint8 * ptr, Uint8 value) SDL_AtomicFetchThenAdd8(volatile Uint8 * ptr, Uint8 value)
{ {
#ifdef nativeFetchThenAdd8 #ifdef nativeFetchThenAdd8
return nativeFetchThenAdd8(ptr, value); return nativeFetchThenAdd8(ptr, value);
...@@ -259,7 +259,7 @@ SDL_AtomicFetchThenAdd8(Uint8 * ptr, Uint8 value) ...@@ -259,7 +259,7 @@ SDL_AtomicFetchThenAdd8(Uint8 * ptr, Uint8 value)
} }
Uint8 Uint8
SDL_AtomicFetchThenSubtract8(Uint8 * ptr, Uint8 value) SDL_AtomicFetchThenSubtract8(volatile Uint8 * ptr, Uint8 value)
{ {
#ifdef nativeFetchThenSubtract8 #ifdef nativeFetchThenSubtract8
return nativeFetchThenSubtract8(ptr, value); return nativeFetchThenSubtract8(ptr, value);
...@@ -276,7 +276,7 @@ SDL_AtomicFetchThenSubtract8(Uint8 * ptr, Uint8 value) ...@@ -276,7 +276,7 @@ SDL_AtomicFetchThenSubtract8(Uint8 * ptr, Uint8 value)
} }
Uint8 Uint8
SDL_AtomicIncrementThenFetch8(Uint8 * ptr) SDL_AtomicIncrementThenFetch8(volatile Uint8 * ptr)
{ {
#ifdef nativeIncrementThenFetch8 #ifdef nativeIncrementThenFetch8
return nativeIncrementThenFetch8(ptr); return nativeIncrementThenFetch8(ptr);
...@@ -293,7 +293,7 @@ SDL_AtomicIncrementThenFetch8(Uint8 * ptr) ...@@ -293,7 +293,7 @@ SDL_AtomicIncrementThenFetch8(Uint8 * ptr)
} }
Uint8 Uint8
SDL_AtomicDecrementThenFetch8(Uint8 * ptr) SDL_AtomicDecrementThenFetch8(volatile Uint8 * ptr)
{ {
#ifdef nativeDecrementThenFetch8 #ifdef nativeDecrementThenFetch8
return nativeDecrementThenFetch8(ptr); return nativeDecrementThenFetch8(ptr);
...@@ -310,7 +310,7 @@ SDL_AtomicDecrementThenFetch8(Uint8 * ptr) ...@@ -310,7 +310,7 @@ SDL_AtomicDecrementThenFetch8(Uint8 * ptr)
} }
Uint8 Uint8
SDL_AtomicAddThenFetch8(Uint8 * ptr, Uint8 value) SDL_AtomicAddThenFetch8(volatile Uint8 * ptr, Uint8 value)
{ {
#ifdef nativeAddThenFetch8 #ifdef nativeAddThenFetch8
return nativeAddThenFetch8(ptr, value); return nativeAddThenFetch8(ptr, value);
...@@ -327,7 +327,7 @@ SDL_AtomicAddThenFetch8(Uint8 * ptr, Uint8 value) ...@@ -327,7 +327,7 @@ SDL_AtomicAddThenFetch8(Uint8 * ptr, Uint8 value)
} }
Uint8 Uint8
SDL_AtomicSubtractThenFetch8(Uint8 * ptr, Uint8 value) SDL_AtomicSubtractThenFetch8(volatile Uint8 * ptr, Uint8 value)
{ {
#ifdef nativeSubtractThenFetch8 #ifdef nativeSubtractThenFetch8
return nativeSubtractThenFetch8(ptr, value); return nativeSubtractThenFetch8(ptr, value);
...@@ -346,7 +346,7 @@ SDL_AtomicSubtractThenFetch8(Uint8 * ptr, Uint8 value) ...@@ -346,7 +346,7 @@ SDL_AtomicSubtractThenFetch8(Uint8 * ptr, Uint8 value)
/* 16 bit atomic operations */ /* 16 bit atomic operations */
Uint16 Uint16
SDL_AtomicExchange16(Uint16 * ptr, Uint16 value) SDL_AtomicExchange16(volatile Uint16 * ptr, Uint16 value)
{ {
#ifdef nativeExchange16 #ifdef nativeExchange16
return nativeExchange16(ptr, value); return nativeExchange16(ptr, value);
...@@ -363,7 +363,7 @@ SDL_AtomicExchange16(Uint16 * ptr, Uint16 value) ...@@ -363,7 +363,7 @@ SDL_AtomicExchange16(Uint16 * ptr, Uint16 value)
} }
SDL_bool SDL_bool
SDL_AtomicCompareThenSet16(Uint16 * ptr, Uint16 oldvalue, Uint16 newvalue) SDL_AtomicCompareThenSet16(volatile Uint16 * ptr, Uint16 oldvalue, Uint16 newvalue)
{ {
#ifdef nativeCompareThenSet16 #ifdef nativeCompareThenSet16
return (SDL_bool)nativeCompareThenSet16(ptr, oldvalue, newvalue); return (SDL_bool)nativeCompareThenSet16(ptr, oldvalue, newvalue);
...@@ -383,7 +383,7 @@ SDL_AtomicCompareThenSet16(Uint16 * ptr, Uint16 oldvalue, Uint16 newvalue) ...@@ -383,7 +383,7 @@ SDL_AtomicCompareThenSet16(Uint16 * ptr, Uint16 oldvalue, Uint16 newvalue)
} }
SDL_bool SDL_bool
SDL_AtomicTestThenSet16(Uint16 * ptr) SDL_AtomicTestThenSet16(volatile Uint16 * ptr)
{ {
#ifdef nativeTestThenSet16 #ifdef nativeTestThenSet16
return (SDL_bool)nativeTestThenSet16(ptr); return (SDL_bool)nativeTestThenSet16(ptr);
...@@ -403,7 +403,7 @@ SDL_AtomicTestThenSet16(Uint16 * ptr) ...@@ -403,7 +403,7 @@ SDL_AtomicTestThenSet16(Uint16 * ptr)
} }
void void
SDL_AtomicClear16(Uint16 * ptr) SDL_AtomicClear16(volatile Uint16 * ptr)
{ {
#ifdef nativeClear16 #ifdef nativeClear16
nativeClear16(ptr); nativeClear16(ptr);
...@@ -417,7 +417,7 @@ SDL_AtomicClear16(Uint16 * ptr) ...@@ -417,7 +417,7 @@ SDL_AtomicClear16(Uint16 * ptr)
} }
Uint16 Uint16
SDL_AtomicFetchThenIncrement16(Uint16 * ptr) SDL_AtomicFetchThenIncrement16(volatile Uint16 * ptr)
{ {
#ifdef nativeFetchThenIncrement16 #ifdef nativeFetchThenIncrement16
return nativeFetchThenIncrement16(ptr); return nativeFetchThenIncrement16(ptr);
...@@ -434,7 +434,7 @@ SDL_AtomicFetchThenIncrement16(Uint16 * ptr) ...@@ -434,7 +434,7 @@ SDL_AtomicFetchThenIncrement16(Uint16 * ptr)
} }
Uint16 Uint16
SDL_AtomicFetchThenDecrement16(Uint16 * ptr) SDL_AtomicFetchThenDecrement16(volatile Uint16 * ptr)
{ {
#ifdef nativeFetchThenDecrement16 #ifdef nativeFetchThenDecrement16
return nativeFetchThenDecrement16(ptr); return nativeFetchThenDecrement16(ptr);
...@@ -451,7 +451,7 @@ SDL_AtomicFetchThenDecrement16(Uint16 * ptr) ...@@ -451,7 +451,7 @@ SDL_AtomicFetchThenDecrement16(Uint16 * ptr)
} }
Uint16 Uint16
SDL_AtomicFetchThenAdd16(Uint16 * ptr, Uint16 value) SDL_AtomicFetchThenAdd16(volatile Uint16 * ptr, Uint16 value)
{ {
#ifdef nativeFetchThenAdd16 #ifdef nativeFetchThenAdd16
return nativeFetchThenAdd16(ptr, value); return nativeFetchThenAdd16(ptr, value);
...@@ -468,7 +468,7 @@ SDL_AtomicFetchThenAdd16(Uint16 * ptr, Uint16 value) ...@@ -468,7 +468,7 @@ SDL_AtomicFetchThenAdd16(Uint16 * ptr, Uint16 value)
} }
Uint16 Uint16
SDL_AtomicFetchThenSubtract16(Uint16 * ptr, Uint16 value) SDL_AtomicFetchThenSubtract16(volatile Uint16 * ptr, Uint16 value)
{ {
#ifdef nativeFetchThenSubtract16 #ifdef nativeFetchThenSubtract16
return nativeFetchThenSubtract16(ptr, value); return nativeFetchThenSubtract16(ptr, value);
...@@ -485,7 +485,7 @@ SDL_AtomicFetchThenSubtract16(Uint16 * ptr, Uint16 value) ...@@ -485,7 +485,7 @@ SDL_AtomicFetchThenSubtract16(Uint16 * ptr, Uint16 value)
} }
Uint16 Uint16
SDL_AtomicIncrementThenFetch16(Uint16 * ptr) SDL_AtomicIncrementThenFetch16(volatile Uint16 * ptr)
{ {
#ifdef nativeIncrementThenFetch16 #ifdef nativeIncrementThenFetch16
return nativeIncrementThenFetch16(ptr); return nativeIncrementThenFetch16(ptr);
...@@ -502,7 +502,7 @@ SDL_AtomicIncrementThenFetch16(Uint16 * ptr) ...@@ -502,7 +502,7 @@ SDL_AtomicIncrementThenFetch16(Uint16 * ptr)
} }
Uint16 Uint16
SDL_AtomicDecrementThenFetch16(Uint16 * ptr) SDL_AtomicDecrementThenFetch16(volatile Uint16 * ptr)
{ {
#ifdef nativeDecrementThenFetch16 #ifdef nativeDecrementThenFetch16
return nativeDecrementThenFetch16(ptr); return nativeDecrementThenFetch16(ptr);
...@@ -519,7 +519,7 @@ SDL_AtomicDecrementThenFetch16(Uint16 * ptr) ...@@ -519,7 +519,7 @@ SDL_AtomicDecrementThenFetch16(Uint16 * ptr)
} }
Uint16 Uint16
SDL_AtomicAddThenFetch16(Uint16 * ptr, Uint16 value) SDL_AtomicAddThenFetch16(volatile Uint16 * ptr, Uint16 value)
{ {
#ifdef nativeAddThenFetch16 #ifdef nativeAddThenFetch16
return nativeAddThenFetch16(ptr, value); return nativeAddThenFetch16(ptr, value);
...@@ -536,7 +536,7 @@ SDL_AtomicAddThenFetch16(Uint16 * ptr, Uint16 value) ...@@ -536,7 +536,7 @@ SDL_AtomicAddThenFetch16(Uint16 * ptr, Uint16 value)
} }
Uint16 Uint16
SDL_AtomicSubtractThenFetch16(Uint16 * ptr, Uint16 value) SDL_AtomicSubtractThenFetch16(volatile Uint16 * ptr, Uint16 value)
{ {
#ifdef nativeSubtractThenFetch16 #ifdef nativeSubtractThenFetch16
return nativeSubtractThenFetch16(ptr, value); return nativeSubtractThenFetch16(ptr, value);
...@@ -555,7 +555,7 @@ SDL_AtomicSubtractThenFetch16(Uint16 * ptr, Uint16 value) ...@@ -555,7 +555,7 @@ SDL_AtomicSubtractThenFetch16(Uint16 * ptr, Uint16 value)
/* 32 bit atomic operations */ /* 32 bit atomic operations */
Uint32 Uint32
SDL_AtomicExchange32(Uint32 * ptr, Uint32 value) SDL_AtomicExchange32(volatile Uint32 * ptr, Uint32 value)
{ {
#ifdef nativeExchange32 #ifdef nativeExchange32
return nativeExchange32(ptr, value); return nativeExchange32(ptr, value);
...@@ -572,7 +572,7 @@ SDL_AtomicExchange32(Uint32 * ptr, Uint32 value) ...@@ -572,7 +572,7 @@ SDL_AtomicExchange32(Uint32 * ptr, Uint32 value)
} }
SDL_bool SDL_bool
SDL_AtomicCompareThenSet32(Uint32 * ptr, Uint32 oldvalue, Uint32 newvalue) SDL_AtomicCompareThenSet32(volatile Uint32 * ptr, Uint32 oldvalue, Uint32 newvalue)
{ {
#ifdef nativeCompareThenSet32 #ifdef nativeCompareThenSet32
return (SDL_bool)nativeCompareThenSet32(ptr, oldvalue, newvalue); return (SDL_bool)nativeCompareThenSet32(ptr, oldvalue, newvalue);
...@@ -592,7 +592,7 @@ SDL_AtomicCompareThenSet32(Uint32 * ptr, Uint32 oldvalue, Uint32 newvalue) ...@@ -592,7 +592,7 @@ SDL_AtomicCompareThenSet32(Uint32 * ptr, Uint32 oldvalue, Uint32 newvalue)
} }
SDL_bool SDL_bool
SDL_AtomicTestThenSet32(Uint32 * ptr) SDL_AtomicTestThenSet32(volatile Uint32 * ptr)
{ {
#ifdef nativeTestThenSet32 #ifdef nativeTestThenSet32
return (SDL_bool)nativeTestThenSet32(ptr); return (SDL_bool)nativeTestThenSet32(ptr);
...@@ -612,7 +612,7 @@ SDL_AtomicTestThenSet32(Uint32 * ptr) ...@@ -612,7 +612,7 @@ SDL_AtomicTestThenSet32(Uint32 * ptr)
} }
void void
SDL_AtomicClear32(Uint32 * ptr) SDL_AtomicClear32(volatile Uint32 * ptr)
{ {
#ifdef nativeClear32 #ifdef nativeClear32
nativeClear32(ptr); nativeClear32(ptr);
...@@ -626,7 +626,7 @@ SDL_AtomicClear32(Uint32 * ptr) ...@@ -626,7 +626,7 @@ SDL_AtomicClear32(Uint32 * ptr)
} }
Uint32 Uint32
SDL_AtomicFetchThenIncrement32(Uint32 * ptr) SDL_AtomicFetchThenIncrement32(volatile Uint32 * ptr)
{ {
#ifdef nativeFetchThenIncrement32 #ifdef nativeFetchThenIncrement32
return nativeFetchThenIncrement32(ptr); return nativeFetchThenIncrement32(ptr);
...@@ -643,7 +643,7 @@ SDL_AtomicFetchThenIncrement32(Uint32 * ptr) ...@@ -643,7 +643,7 @@ SDL_AtomicFetchThenIncrement32(Uint32 * ptr)
} }
Uint32 Uint32
SDL_AtomicFetchThenDecrement32(Uint32 * ptr) SDL_AtomicFetchThenDecrement32(volatile Uint32 * ptr)
{ {
#ifdef nativeFetchThenDecrement32 #ifdef nativeFetchThenDecrement32
return nativeFetchThenDecrement32(ptr); return nativeFetchThenDecrement32(ptr);
...@@ -660,7 +660,7 @@ SDL_AtomicFetchThenDecrement32(Uint32 * ptr) ...@@ -660,7 +660,7 @@ SDL_AtomicFetchThenDecrement32(Uint32 * ptr)
} }
Uint32 Uint32
SDL_AtomicFetchThenAdd32(Uint32 * ptr, Uint32 value) SDL_AtomicFetchThenAdd32(volatile Uint32 * ptr, Uint32 value)
{ {
#ifdef nativeFetchThenAdd32 #ifdef nativeFetchThenAdd32
return nativeFetchThenAdd32(ptr, value); return nativeFetchThenAdd32(ptr, value);
...@@ -677,7 +677,7 @@ SDL_AtomicFetchThenAdd32(Uint32 * ptr, Uint32 value) ...@@ -677,7 +677,7 @@ SDL_AtomicFetchThenAdd32(Uint32 * ptr, Uint32 value)
} }
Uint32 Uint32
SDL_AtomicFetchThenSubtract32(Uint32 * ptr, Uint32 value) SDL_AtomicFetchThenSubtract32(volatile Uint32 * ptr, Uint32 value)
{ {
#ifdef nativeFetchThenSubtract32 #ifdef nativeFetchThenSubtract32
return nativeFetchThenSubtract32(ptr, value); return nativeFetchThenSubtract32(ptr, value);
...@@ -694,7 +694,7 @@ SDL_AtomicFetchThenSubtract32(Uint32 * ptr, Uint32 value) ...@@ -694,7 +694,7 @@ SDL_AtomicFetchThenSubtract32(Uint32 * ptr, Uint32 value)
} }
Uint32 Uint32
SDL_AtomicIncrementThenFetch32(Uint32 * ptr) SDL_AtomicIncrementThenFetch32(volatile Uint32 * ptr)
{ {
#ifdef nativeIncrementThenFetch32 #ifdef nativeIncrementThenFetch32
return nativeIncrementThenFetch32(ptr); return nativeIncrementThenFetch32(ptr);
...@@ -711,7 +711,7 @@ SDL_AtomicIncrementThenFetch32(Uint32 * ptr) ...@@ -711,7 +711,7 @@ SDL_AtomicIncrementThenFetch32(Uint32 * ptr)
} }
Uint32 Uint32
SDL_AtomicDecrementThenFetch32(Uint32 * ptr) SDL_AtomicDecrementThenFetch32(volatile Uint32 * ptr)
{ {
#ifdef nativeDecrementThenFetch32 #ifdef nativeDecrementThenFetch32
return nativeDecrementThenFetch32(ptr); return nativeDecrementThenFetch32(ptr);
...@@ -728,7 +728,7 @@ SDL_AtomicDecrementThenFetch32(Uint32 * ptr) ...@@ -728,7 +728,7 @@ SDL_AtomicDecrementThenFetch32(Uint32 * ptr)
} }
Uint32 Uint32
SDL_AtomicAddThenFetch32(Uint32 * ptr, Uint32 value) SDL_AtomicAddThenFetch32(volatile Uint32 * ptr, Uint32 value)
{ {
#ifdef nativeAddThenFetch32 #ifdef nativeAddThenFetch32
return nativeAddThenFetch32(ptr, value); return nativeAddThenFetch32(ptr, value);
...@@ -745,7 +745,7 @@ SDL_AtomicAddThenFetch32(Uint32 * ptr, Uint32 value) ...@@ -745,7 +745,7 @@ SDL_AtomicAddThenFetch32(Uint32 * ptr, Uint32 value)
} }
Uint32 Uint32
SDL_AtomicSubtractThenFetch32(Uint32 * ptr, Uint32 value) SDL_AtomicSubtractThenFetch32(volatile Uint32 * ptr, Uint32 value)
{ {
#ifdef nativeSubtractThenFetch32 #ifdef nativeSubtractThenFetch32
return nativeSubtractThenFetch32(ptr, value); return nativeSubtractThenFetch32(ptr, value);
...@@ -765,7 +765,7 @@ SDL_AtomicSubtractThenFetch32(Uint32 * ptr, Uint32 value) ...@@ -765,7 +765,7 @@ SDL_AtomicSubtractThenFetch32(Uint32 * ptr, Uint32 value)
#ifdef SDL_HAS_64BIT_TYPE #ifdef SDL_HAS_64BIT_TYPE
Uint64 Uint64
SDL_AtomicExchange64(Uint64 * ptr, Uint64 value) SDL_AtomicExchange64(volatile Uint64 * ptr, Uint64 value)
{ {
#ifdef nativeExchange64 #ifdef nativeExchange64
return nativeExchange64(ptr, value); return nativeExchange64(ptr, value);
...@@ -782,7 +782,7 @@ SDL_AtomicExchange64(Uint64 * ptr, Uint64 value) ...@@ -782,7 +782,7 @@ SDL_AtomicExchange64(Uint64 * ptr, Uint64 value)
} }
SDL_bool SDL_bool
SDL_AtomicCompareThenSet64(Uint64 * ptr, Uint64 oldvalue, Uint64 newvalue) SDL_AtomicCompareThenSet64(volatile Uint64 * ptr, Uint64 oldvalue, Uint64 newvalue)
{ {
#ifdef nativeCompareThenSet64 #ifdef nativeCompareThenSet64
return (SDL_bool)nativeCompareThenSet64(ptr, oldvalue, newvalue); return (SDL_bool)nativeCompareThenSet64(ptr, oldvalue, newvalue);
...@@ -802,7 +802,7 @@ SDL_AtomicCompareThenSet64(Uint64 * ptr, Uint64 oldvalue, Uint64 newvalue) ...@@ -802,7 +802,7 @@ SDL_AtomicCompareThenSet64(Uint64 * ptr, Uint64 oldvalue, Uint64 newvalue)
} }
SDL_bool SDL_bool
SDL_AtomicTestThenSet64(Uint64 * ptr) SDL_AtomicTestThenSet64(volatile Uint64 * ptr)
{ {
#ifdef nativeTestThenSet64 #ifdef nativeTestThenSet64
return (SDL_bool)nativeTestThenSet64(ptr); return (SDL_bool)nativeTestThenSet64(ptr);
...@@ -822,7 +822,7 @@ SDL_AtomicTestThenSet64(Uint64 * ptr) ...@@ -822,7 +822,7 @@ SDL_AtomicTestThenSet64(Uint64 * ptr)
} }
void void
SDL_AtomicClear64(Uint64 * ptr) SDL_AtomicClear64(volatile Uint64 * ptr)
{ {
#ifdef nativeClear64 #ifdef nativeClear64
nativeClear64(ptr); nativeClear64(ptr);
...@@ -836,7 +836,7 @@ SDL_AtomicClear64(Uint64 * ptr) ...@@ -836,7 +836,7 @@ SDL_AtomicClear64(Uint64 * ptr)
} }
Uint64 Uint64
SDL_AtomicFetchThenIncrement64(Uint64 * ptr) SDL_AtomicFetchThenIncrement64(volatile Uint64 * ptr)
{ {
#ifdef nativeFetchThenIncrement64 #ifdef nativeFetchThenIncrement64
return nativeFetchThenIncrement64(ptr); return nativeFetchThenIncrement64(ptr);
...@@ -853,7 +853,7 @@ SDL_AtomicFetchThenIncrement64(Uint64 * ptr) ...@@ -853,7 +853,7 @@ SDL_AtomicFetchThenIncrement64(Uint64 * ptr)
} }
Uint64 Uint64
SDL_AtomicFetchThenDecrement64(Uint64 * ptr) SDL_AtomicFetchThenDecrement64(volatile Uint64 * ptr)
{ {
#ifdef nativeFetchThenDecrement64 #ifdef nativeFetchThenDecrement64
return nativeFetchThenDecrement64(ptr); return nativeFetchThenDecrement64(ptr);
...@@ -870,7 +870,7 @@ SDL_AtomicFetchThenDecrement64(Uint64 * ptr) ...@@ -870,7 +870,7 @@ SDL_AtomicFetchThenDecrement64(Uint64 * ptr)
} }
Uint64 Uint64
SDL_AtomicFetchThenAdd64(Uint64 * ptr, Uint64 value) SDL_AtomicFetchThenAdd64(volatile Uint64 * ptr, Uint64 value)
{ {
#ifdef nativeFetchThenAdd64 #ifdef nativeFetchThenAdd64
return nativeFetchThenAdd64(ptr, value); return nativeFetchThenAdd64(ptr, value);
...@@ -887,7 +887,7 @@ SDL_AtomicFetchThenAdd64(Uint64 * ptr, Uint64 value) ...@@ -887,7 +887,7 @@ SDL_AtomicFetchThenAdd64(Uint64 * ptr, Uint64 value)
} }
Uint64 Uint64
SDL_AtomicFetchThenSubtract64(Uint64 * ptr, Uint64 value) SDL_AtomicFetchThenSubtract64(volatile Uint64 * ptr, Uint64 value)
{ {
#ifdef nativeFetchThenSubtract64 #ifdef nativeFetchThenSubtract64
return nativeFetchThenSubtract64(ptr, value); return nativeFetchThenSubtract64(ptr, value);
...@@ -904,7 +904,7 @@ SDL_AtomicFetchThenSubtract64(Uint64 * ptr, Uint64 value) ...@@ -904,7 +904,7 @@ SDL_AtomicFetchThenSubtract64(Uint64 * ptr, Uint64 value)
} }
Uint64 Uint64
SDL_AtomicIncrementThenFetch64(Uint64 * ptr) SDL_AtomicIncrementThenFetch64(volatile Uint64 * ptr)
{ {
#ifdef nativeIncrementThenFetch64 #ifdef nativeIncrementThenFetch64
return nativeIncrementThenFetch64(ptr); return nativeIncrementThenFetch64(ptr);
...@@ -921,7 +921,7 @@ SDL_AtomicIncrementThenFetch64(Uint64 * ptr) ...@@ -921,7 +921,7 @@ SDL_AtomicIncrementThenFetch64(Uint64 * ptr)
} }
Uint64 Uint64
SDL_AtomicDecrementThenFetch64(Uint64 * ptr) SDL_AtomicDecrementThenFetch64(volatile Uint64 * ptr)
{ {
#ifdef nativeDecrementThenFetch64 #ifdef nativeDecrementThenFetch64
return nativeDecrementThenFetch64(ptr); return nativeDecrementThenFetch64(ptr);
...@@ -938,7 +938,7 @@ SDL_AtomicDecrementThenFetch64(Uint64 * ptr) ...@@ -938,7 +938,7 @@ SDL_AtomicDecrementThenFetch64(Uint64 * ptr)
} }
Uint64 Uint64
SDL_AtomicAddThenFetch64(Uint64 * ptr, Uint64 value) SDL_AtomicAddThenFetch64(volatile Uint64 * ptr, Uint64 value)
{ {
#ifdef nativeAddThenFetch64 #ifdef nativeAddThenFetch64
return nativeAddThenFetch64(ptr, value); return nativeAddThenFetch64(ptr, value);
...@@ -955,7 +955,7 @@ SDL_AtomicAddThenFetch64(Uint64 * ptr, Uint64 value) ...@@ -955,7 +955,7 @@ SDL_AtomicAddThenFetch64(Uint64 * ptr, Uint64 value)
} }
Uint64 Uint64
SDL_AtomicSubtractThenFetch64(Uint64 * ptr, Uint64 value) SDL_AtomicSubtractThenFetch64(volatile Uint64 * ptr, Uint64 value)
{ {
#ifdef nativeSubtractThenFetch64 #ifdef nativeSubtractThenFetch64
return nativeSubtractThenFetch64(ptr, value); return nativeSubtractThenFetch64(ptr, value);
......
...@@ -23,16 +23,16 @@ int ...@@ -23,16 +23,16 @@ int
main(int argc, char **argv) main(int argc, char **argv)
{ {
Uint8 val8 = 0; volatile Uint8 val8 = 0;
Uint8 ret8 = 0; Uint8 ret8 = 0;
Uint16 val16 = 0; volatile Uint16 val16 = 0;
Uint16 ret16 = 0; Uint16 ret16 = 0;
Uint32 val32 = 0; volatile Uint32 val32 = 0;
Uint32 ret32 = 0; Uint32 ret32 = 0;
Uint64 val64 = 0; volatile Uint64 val64 = 0;
Uint64 ret64 = 0; Uint64 ret64 = 0;
SDL_bool tfret = SDL_FALSE; SDL_bool tfret = SDL_FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment