Branimir Karadžić 8 年之前
父节点
当前提交
1460b6139d
共有 3 个文件被更改,包括 1 次插入34 次删除
  1. 1 1
      include/bx/mpscqueue.h
  2. 0 22
      include/bx/mutex.h
  3. 0 11
      include/bx/mutex.inl

+ 1 - 1
include/bx/mpscqueue.h

@@ -29,7 +29,7 @@ namespace bx
 
 		void push(Ty* _ptr) // producer only
 		{
-			LwMutexScope lock(m_write);
+			MutexScope lock(m_write);
 			m_queue.push(_ptr);
 		}
 

+ 0 - 22
include/bx/mutex.h

@@ -57,28 +57,6 @@ namespace bx
 		Mutex& m_mutex;
 	};
 
-	typedef Mutex LwMutex;
-
-	///
-	class LwMutexScope
-	{
-		BX_CLASS(LwMutexScope
-			, NO_DEFAULT_CTOR
-			, NO_COPY
-			, NO_ASSIGNMENT
-			);
-
-	public:
-		///
-		LwMutexScope(LwMutex& _mutex);
-
-		///
-		~LwMutexScope();
-
-	private:
-		LwMutex& m_mutex;
-	};
-
 } // namespace bx
 
 #include "mutex.inl"

+ 0 - 11
include/bx/mutex.inl

@@ -20,15 +20,4 @@ namespace bx
 		m_mutex.unlock();
 	}
 
-	inline LwMutexScope::LwMutexScope(LwMutex& _mutex)
-		: m_mutex(_mutex)
-	{
-		m_mutex.lock();
-	}
-
-	inline LwMutexScope::~LwMutexScope()
-	{
-		m_mutex.unlock();
-	}
-
 } // namespace bx