diff options
author | Ed Maste <emaste@FreeBSD.org> | 2014-11-25 21:00:58 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2014-11-25 21:00:58 +0000 |
commit | 0cac4ca3916ac24ab6139d03cbfd18db9e715bfe (patch) | |
tree | c94307da318be46e5aeea1a325c1e91749506e4f /source/Host/common/Mutex.cpp | |
parent | 03b99097822ca3ac69252d9afae716a584ed56c4 (diff) |
Notes
Diffstat (limited to 'source/Host/common/Mutex.cpp')
-rw-r--r-- | source/Host/common/Mutex.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/Host/common/Mutex.cpp b/source/Host/common/Mutex.cpp index 4e0135535628..c26467fa0d79 100644 --- a/source/Host/common/Mutex.cpp +++ b/source/Host/common/Mutex.cpp @@ -242,9 +242,9 @@ Mutex::Mutex (Mutex::Type type) : //---------------------------------------------------------------------- Mutex::~Mutex() { +#if ENABLE_MUTEX_ERROR_CHECKING int err = ::pthread_mutex_destroy (&m_mutex); assert(err == 0); -#if ENABLE_MUTEX_ERROR_CHECKING if (err == 0) error_check_mutex (&m_mutex, eMutexActionDestroyed); else @@ -253,6 +253,8 @@ Mutex::~Mutex() assert(err == 0); } memset (&m_mutex, '\xba', sizeof(m_mutex)); +#else + ::pthread_mutex_destroy (&m_mutex); #endif } |