summaryrefslogtreecommitdiffstats
path: root/Source/cmUVHandlePtr.cxx
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2017-12-01 19:09:51 (GMT)
committerJustin Berger <j.david.berger@gmail.com>2017-12-01 19:09:51 (GMT)
commit3519c8f2473c40fd6d2ce86e29742ef30b7e11f1 (patch)
treef1a3b792b554aca0c65b467b28bd69a30e0c6961 /Source/cmUVHandlePtr.cxx
parenta4faf8638744edf7e3dd8931b55ba87e8f7738be (diff)
downloadCMake-3519c8f2473c40fd6d2ce86e29742ef30b7e11f1.zip
CMake-3519c8f2473c40fd6d2ce86e29742ef30b7e11f1.tar.gz
CMake-3519c8f2473c40fd6d2ce86e29742ef30b7e11f1.tar.bz2
utilities: Swapped to use std C++11 mutex/threading constructs
Diffstat (limited to 'Source/cmUVHandlePtr.cxx')
-rw-r--r--Source/cmUVHandlePtr.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmUVHandlePtr.cxx b/Source/cmUVHandlePtr.cxx
index d7e38c3..eb70416 100644
--- a/Source/cmUVHandlePtr.cxx
+++ b/Source/cmUVHandlePtr.cxx
@@ -4,9 +4,9 @@
#include "cmUVHandlePtr.h"
#include <assert.h>
+#include <mutex>
#include <stdlib.h>
-#include "cm_thread.hxx"
#include "cm_uv.h"
namespace cm {
@@ -97,16 +97,16 @@ struct uv_handle_deleter<uv_async_t>
* which is mandated by the standard for Deleter on
* shared_ptrs.
*/
- std::shared_ptr<cm::mutex> handleMutex;
+ std::shared_ptr<std::mutex> handleMutex;
uv_handle_deleter()
- : handleMutex(std::make_shared<cm::mutex>())
+ : handleMutex(std::make_shared<std::mutex>())
{
}
void operator()(uv_async_t* handle)
{
- cm::lock_guard<cm::mutex> lock(*handleMutex);
+ std::lock_guard<std::mutex> lock(*handleMutex);
default_delete(handle);
}
};
@@ -116,7 +116,7 @@ void uv_async_ptr::send()
auto deleter = std::get_deleter<uv_handle_deleter<uv_async_t>>(this->handle);
assert(deleter);
- cm::lock_guard<cm::mutex> lock(*deleter->handleMutex);
+ std::lock_guard<std::mutex> lock(*deleter->handleMutex);
if (this->handle) {
uv_async_send(*this);
}