summaryrefslogtreecommitdiff
path: root/src/debug-agent.h
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2016-06-18 01:39:05 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2016-06-21 10:29:14 +0200
commitd7087df4da8c1824f30f567b95a9633209690485 (patch)
treee510ce9984ad37ca64b2824412d8c14e6e2eeafb /src/debug-agent.h
parentbb33c28e2141a1eabdff753e6717f5aea5866146 (diff)
downloadandroid-node-v8-d7087df4da8c1824f30f567b95a9633209690485.tar.gz
android-node-v8-d7087df4da8c1824f30f567b95a9633209690485.tar.bz2
android-node-v8-d7087df4da8c1824f30f567b95a9633209690485.zip
src: use RAII for mutexes and condition variables
We will be introducing many more critical sections in the upcoming multi-isolate changes, so let's make manual synchronization a thing of the past. PR-URL: https://github.com/nodejs/node/pull/7334 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'src/debug-agent.h')
-rw-r--r--src/debug-agent.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/debug-agent.h b/src/debug-agent.h
index 6b151c4587..45aa07bf24 100644
--- a/src/debug-agent.h
+++ b/src/debug-agent.h
@@ -24,6 +24,7 @@
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
+#include "node_mutex.h"
#include "util.h"
#include "util-inl.h"
#include "uv.h"
@@ -117,7 +118,7 @@ class Agent {
bool wait_;
uv_sem_t start_sem_;
- uv_mutex_t message_mutex_;
+ node::Mutex message_mutex_;
uv_async_t child_signal_;
uv_thread_t thread_;