aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-04-18 06:39:46 -0700
committerChris Robinson <[email protected]>2014-04-18 06:39:46 -0700
commitb8d56190d1ab055a5d34f6ea27126098f0bd0370 (patch)
treea1a25a3fb214ddb6995595d97316c48123db2d2b /OpenAL32
parentcb3315f9d3591f0d48c630526f7415d7c6213cff (diff)
Check pthread_mutex_unlock for errors
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/threads.h7
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;
}