Просмотр исходного кода

Mutex::lock and ::unlock just called themselves

Grant Limberg 7 лет назад
Родитель
Сommit
239c2540d6
1 измененных файлов с 10 добавлено и 0 удалено
  1. 10 0
      node/Mutex.hpp

+ 10 - 0
node/Mutex.hpp

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