浏览代码

Mutex::lock and ::unlock just called themselves

Grant Limberg 7 年之前
父节点
当前提交
239c2540d6
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      node/Mutex.hpp

+ 10 - 0
node/Mutex.hpp

@@ -177,6 +177,16 @@ public:
 		DeleteCriticalSection(&_cs);
 	}
 
+	inline void lock()
+	{
+		EnterCriticalSection(&_cs);
+	}
+
+	inline void unlock()
+	{
+		LeaveCriticalSection(&_cs);
+	}
+
 	inline void lock() const
 	{
 		(const_cast <Mutex *> (this))->lock();