aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alError.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/alError.c')
-rw-r--r--OpenAL32/alError.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenAL32/alError.c b/OpenAL32/alError.c
index b557532e..b38d8dfe 100644
--- a/OpenAL32/alError.c
+++ b/OpenAL32/alError.c
@@ -13,8 +13,8 @@
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* Or go to http://www.gnu.org/copyleft/lgpl.html
*/
@@ -35,6 +35,7 @@ ALboolean TrapALError = AL_FALSE;
ALvoid alSetError(ALCcontext *Context, ALenum errorCode)
{
+ ALenum curerr = AL_NO_ERROR;
if(TrapALError)
{
#ifdef _WIN32
@@ -45,7 +46,7 @@ ALvoid alSetError(ALCcontext *Context, ALenum errorCode)
raise(SIGTRAP);
#endif
}
- CompExchangeInt(&Context->LastError, AL_NO_ERROR, errorCode);
+ ATOMIC_COMPARE_EXCHANGE_STRONG(ALenum, &Context->LastError, &curerr, errorCode);
}
AL_API ALenum AL_APIENTRY alGetError(void)
@@ -68,7 +69,7 @@ AL_API ALenum AL_APIENTRY alGetError(void)
return AL_INVALID_OPERATION;
}
- errorCode = ExchangeInt(&Context->LastError, AL_NO_ERROR);
+ errorCode = ATOMIC_EXCHANGE(ALenum, &Context->LastError, AL_NO_ERROR);
ALCcontext_DecRef(Context);