summaryrefslogtreecommitdiffstats
path: root/source/cCriticalSection.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-01-30 17:01:45 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-01-30 17:01:45 +0100
commit51dc47bc70d66667ed1aee597d82dbdcfaf92fa1 (patch)
tree9e5fd39541516c0f8ced34b36f6e546bcd3886bb /source/cCriticalSection.cpp
parentInitial cFile implementation (using stdio FILE) and test in cChunkMap (diff)
downloadcuberite-51dc47bc70d66667ed1aee597d82dbdcfaf92fa1.tar
cuberite-51dc47bc70d66667ed1aee597d82dbdcfaf92fa1.tar.gz
cuberite-51dc47bc70d66667ed1aee597d82dbdcfaf92fa1.tar.bz2
cuberite-51dc47bc70d66667ed1aee597d82dbdcfaf92fa1.tar.lz
cuberite-51dc47bc70d66667ed1aee597d82dbdcfaf92fa1.tar.xz
cuberite-51dc47bc70d66667ed1aee597d82dbdcfaf92fa1.tar.zst
cuberite-51dc47bc70d66667ed1aee597d82dbdcfaf92fa1.zip
Diffstat (limited to 'source/cCriticalSection.cpp')
-rw-r--r--source/cCriticalSection.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/cCriticalSection.cpp b/source/cCriticalSection.cpp
index 6bc6e805a..95ee77c3d 100644
--- a/source/cCriticalSection.cpp
+++ b/source/cCriticalSection.cpp
@@ -92,6 +92,19 @@ cCSLock::cCSLock(cCriticalSection * a_CS)
+cCSLock::cCSLock(cCriticalSection & a_CS)
+ : m_CS(&a_CS)
+ #ifdef _DEBUG
+ , m_IsLocked(false)
+ #endif
+{
+ Lock();
+}
+
+
+
+
+
cCSLock::~cCSLock()
{
Unlock();