|
From: <axl...@us...> - 2009-05-14 21:59:27
|
Revision: 244
http://hgengine.svn.sourceforge.net/hgengine/?rev=244&view=rev
Author: axlecrusher
Date: 2009-05-14 21:59:18 +0000 (Thu, 14 May 2009)
Log Message:
-----------
use a semaphore in place of a mutex
Modified Paths:
--------------
Mercury2/src/MAutoPtr.h
Modified: Mercury2/src/MAutoPtr.h
===================================================================
--- Mercury2/src/MAutoPtr.h 2009-05-14 11:01:14 UTC (rev 243)
+++ Mercury2/src/MAutoPtr.h 2009-05-14 21:59:18 UTC (rev 244)
@@ -2,8 +2,10 @@
#define MAUTOPTR_H
#include <MercuryThreads.h>
+#include <MSemaphore.h>
#include <stdlib.h>
+
class RefBase
{
public:
@@ -135,12 +137,16 @@
T* m_ptr;
- static MercuryMutex m_criticalSection;
+// static MercuryMutex m_criticalSection;
+ static MSemaphore m_criticalSection;
};
template<typename T>
-MercuryMutex MAutoPtr<T>::m_criticalSection = MercuryMutex();
+MSemaphore MAutoPtr<T>::m_criticalSection;
+//template<typename T>
+//MercuryMutex MAutoPtr<T>::m_criticalSection = MercuryMutex();
+
#endif
/***************************************************************************
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|