From b8d56190d1ab055a5d34f6ea27126098f0bd0370 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 18 Apr 2014 06:39:46 -0700 Subject: Check pthread_mutex_unlock for errors --- OpenAL32/Include/threads.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'OpenAL32/Include') 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; } -- cgit v1.2.3