diff options
author | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:52:29 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:52:29 +0200 |
commit | d3e1925aa7388cd842408032621fae29133dd971 (patch) | |
tree | 02e0bd2fdc4bf0214d15c829d9ad5eebb0a03d38 /zen/zstring.cpp | |
parent | 6.8 (diff) | |
download | FreeFileSync-d3e1925aa7388cd842408032621fae29133dd971.tar.gz FreeFileSync-d3e1925aa7388cd842408032621fae29133dd971.tar.bz2 FreeFileSync-d3e1925aa7388cd842408032621fae29133dd971.zip |
6.9
Diffstat (limited to 'zen/zstring.cpp')
-rw-r--r-- | zen/zstring.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/zen/zstring.cpp b/zen/zstring.cpp index f1858efc..f16af6a0 100644 --- a/zen/zstring.cpp +++ b/zen/zstring.cpp @@ -18,6 +18,7 @@ #ifndef NDEBUG #include <mutex> #include <iostream> +#include "thread.h" #endif using namespace zen; @@ -38,14 +39,14 @@ public: void insert(const void* ptr, size_t size) { - std::lock_guard<std::mutex> dummy(lockActStrings); + boost::lock_guard<boost::mutex> dummy(lockActStrings); if (!activeStrings.insert(std::make_pair(ptr, size)).second) reportProblem("Serious Error: New memory points into occupied space: " + rawMemToString(ptr, size)); } void remove(const void* ptr) { - std::lock_guard<std::mutex> dummy(lockActStrings); + boost::lock_guard<boost::mutex> dummy(lockActStrings); if (activeStrings.erase(ptr) != 1) reportProblem("Serious Error: No memory available for deallocation at this location!"); } @@ -94,7 +95,7 @@ private: throw std::logic_error("Memory leak! " + message); } - std::mutex lockActStrings; + boost::mutex lockActStrings; zen::hash_map<const void*, size_t> activeStrings; }; |