X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fplatform%2Fthreads%2Fmutex.h;h=2bd908e533ee00d2298c6c1083afdd6bcd44f3b5;hb=d9de2aae6b2f47b8e1faacc69adba7406b9d85f0;hp=00953db0e0cdada4aee48de1cdf4f191a04806bb;hpb=2b44051cbfa70deafc30d9767323214debbc1a75;p=deb_libcec.git diff --git a/src/lib/platform/threads/mutex.h b/src/lib/platform/threads/mutex.h index 00953db..2bd908e 100644 --- a/src/lib/platform/threads/mutex.h +++ b/src/lib/platform/threads/mutex.h @@ -2,7 +2,7 @@ /* * This file is part of the libCEC(R) library. * - * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited. All rights reserved. + * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved. * libCEC(R) is an original work, containing original code. * * libCEC(R) is a trademark of Pulse-Eight Limited. @@ -86,9 +86,12 @@ namespace PLATFORM inline bool Lock(void) { - MutexLock(m_mutex); - ++m_iLockCount; - return true; + if (MutexLock(m_mutex)) + { + ++m_iLockCount; + return true; + } + return false; } inline void Unlock(void)