X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fplatform%2Fthreads%2Fmutex.h;h=286cc3274dd6240e73acba22886188a64553063d;hb=95587b956c69ead0b46d301f5ca70e977890c3fd;hp=ed60ba8724612fae369e1fd7e9e33ede7877e97e;hpb=8f6e48cd4aaefa12c0a5cbd6cc17f8649396bdf6;p=deb_libcec.git diff --git a/src/lib/platform/threads/mutex.h b/src/lib/platform/threads/mutex.h index ed60ba8..286cc32 100644 --- a/src/lib/platform/threads/mutex.h +++ b/src/lib/platform/threads/mutex.h @@ -31,15 +31,15 @@ * http://www.pulse-eight.net/ */ -#include "../os.h" +#include "lib/platform/os.h" #if defined(__WINDOWS__) -#include "../windows/os-threads.h" +#include "lib/platform/windows/os-threads.h" #else -#include "../posix/os-threads.h" +#include "lib/platform/posix/os-threads.h" #endif -#include "../util/timeutils.h" +#include "lib/platform/util/timeutils.h" namespace PLATFORM { @@ -51,7 +51,7 @@ namespace PLATFORM private: inline PreventCopy(const PreventCopy &c) { *this = c; } - inline PreventCopy &operator=(const PreventCopy &c){ *this = c; return *this; } + inline PreventCopy &operator=(const PreventCopy & UNUSED(c)){ return *this; } }; template @@ -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)