diff options
author | Chris Robinson <[email protected]> | 2014-04-18 06:39:46 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-04-18 06:39:46 -0700 |
commit | b8d56190d1ab055a5d34f6ea27126098f0bd0370 (patch) | |
tree | a1a25a3fb214ddb6995595d97316c48123db2d2b | |
parent | cb3315f9d3591f0d48c630526f7415d7c6213cff (diff) |
Check pthread_mutex_unlock for errors
-rw-r--r-- | OpenAL32/Include/threads.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenAL32/Include/threads.h b/OpenAL32/Include/threads.h index 3b9f8654..c78f6ab9 100644 --- a/OpenAL32/Include/threads.h +++ b/OpenAL32/Include/threads.h @@ -6,10 +6,10 @@ enum { althrd_success = 0, + althrd_error, althrd_nomem, althrd_timedout, - althrd_busy, - althrd_error + althrd_busy }; enum { @@ -167,7 +167,8 @@ inline int almtx_lock(almtx_t *mtx) inline int almtx_unlock(almtx_t *mtx) { if(!mtx) return althrd_error; - pthread_mutex_unlock(mtx); + if(pthread_mutex_unlock(mtx) != 0) + return althrd_error; return althrd_success; } |