diff options
author | Sven Gothel <[email protected]> | 2015-11-12 18:12:26 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-11-12 18:12:26 +0100 |
commit | 542c4804aafe3f3879cee56d19d7353ed49ee154 (patch) | |
tree | 9c89aeda9ec5d368a1fb016422448e6418fc87db /OpenAL32/alError.c | |
parent | 2e8f6a1704dfa0048dbfc2f826847a4aaea3cbe8 (diff) | |
parent | 5d039309b355c350fd087a48c4b896d31871d174 (diff) |
Merge branch 'UPSTREAM'
Diffstat (limited to 'OpenAL32/alError.c')
-rw-r--r-- | OpenAL32/alError.c | 9 |
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); |