updated copyright messages for 2013
[deb_libcec.git] / src / lib / platform / threads / mutex.h
index 6fc57d140bcdf183a0745fa7d52d3b54a23c00c0..2bd908e533ee00d2298c6c1083afdd6bcd44f3b5 100644 (file)
@@ -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.
  *     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
 {
@@ -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)