aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/threads/CriticalSection.h4
-rw-r--r--xbmc/threads/platform/RecursiveMutex.h22
-rw-r--r--xbmc/threads/platform/pthreads/ThreadImpl.cpp4
3 files changed, 15 insertions, 15 deletions
diff --git a/xbmc/threads/CriticalSection.h b/xbmc/threads/CriticalSection.h
index 8a47c260be..1e51f57fe1 100644
--- a/xbmc/threads/CriticalSection.h
+++ b/xbmc/threads/CriticalSection.h
@@ -20,7 +20,7 @@
#pragma once
-#include "threads/Lockables.h"
#include "platform/RecursiveMutex.h"
+#include "threads/Lockables.h"
-class CCriticalSection : public XbmcThreads::CountingLockable<XbmcThreads::RecursiveMutex> {};
+class CCriticalSection : public XbmcThreads::CountingLockable<XbmcThreads::CRecursiveMutex> {};
diff --git a/xbmc/threads/platform/RecursiveMutex.h b/xbmc/threads/platform/RecursiveMutex.h
index 57c1c9978f..2b697c67ba 100644
--- a/xbmc/threads/platform/RecursiveMutex.h
+++ b/xbmc/threads/platform/RecursiveMutex.h
@@ -26,38 +26,38 @@
namespace XbmcThreads
{
// forward declare in preparation for the friend declaration
- class RecursiveMutex
+ class CRecursiveMutex
{
- pthread_mutex_t mutex;
+ pthread_mutex_t m_mutex;
// implementation is in threads/platform/pthreads/ThreadImpl.cpp
static pthread_mutexattr_t* getRecursiveAttr();
public:
- RecursiveMutex(const RecursiveMutex&) = delete;
- RecursiveMutex& operator=(const RecursiveMutex&) = delete;
+ CRecursiveMutex(const CRecursiveMutex&) = delete;
+ CRecursiveMutex& operator=(const CRecursiveMutex&) = delete;
- inline RecursiveMutex() { pthread_mutex_init(&mutex,getRecursiveAttr()); }
+ inline CRecursiveMutex() { pthread_mutex_init(&m_mutex,getRecursiveAttr()); }
- inline ~RecursiveMutex() { pthread_mutex_destroy(&mutex); }
+ inline ~CRecursiveMutex() { pthread_mutex_destroy(&m_mutex); }
- inline void lock() { pthread_mutex_lock(&mutex); }
+ inline void lock() { pthread_mutex_lock(&m_mutex); }
- inline void unlock() { pthread_mutex_unlock(&mutex); }
+ inline void unlock() { pthread_mutex_unlock(&m_mutex); }
- inline bool try_lock() { return (pthread_mutex_trylock(&mutex) == 0); }
+ inline bool try_lock() { return (pthread_mutex_trylock(&m_mutex) == 0); }
inline std::recursive_mutex::native_handle_type native_handle()
{
- return &mutex;
+ return &m_mutex;
}
};
}
#elif (defined TARGET_WINDOWS)
namespace XbmcThreads
{
- typedef std::recursive_mutex RecursiveMutex;
+ typedef std::recursive_mutex CRecursiveMutex;
}
#endif
diff --git a/xbmc/threads/platform/pthreads/ThreadImpl.cpp b/xbmc/threads/platform/pthreads/ThreadImpl.cpp
index 4582a55c3a..5068223515 100644
--- a/xbmc/threads/platform/pthreads/ThreadImpl.cpp
+++ b/xbmc/threads/platform/pthreads/ThreadImpl.cpp
@@ -50,7 +50,7 @@ namespace XbmcThreads
{
pthread_mutexattr_init(&recursiveAttr);
pthread_mutexattr_settype(&recursiveAttr,PTHREAD_MUTEX_RECURSIVE);
-#if !defined(__arm__) && !defined(TARGET_ANDROID)
+#if !defined(TARGET_ANDROID)
pthread_mutexattr_setprotocol(&recursiveAttr,PTHREAD_PRIO_INHERIT);
#endif
alreadyCalled = true;
@@ -60,7 +60,7 @@ namespace XbmcThreads
static bool recursiveAttrSet = setRecursiveAttr();
- pthread_mutexattr_t* RecursiveMutex::getRecursiveAttr()
+ pthread_mutexattr_t* CRecursiveMutex::getRecursiveAttr()
{
if (!recursiveAttrSet) // this is only possible in the single threaded startup code
recursiveAttrSet = setRecursiveAttr();