diff options
author | Ben Caimano <ben.caimano@mongodb.com> | 2019-11-01 17:24:53 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-11-01 17:24:53 +0000 |
commit | bf5bef47a8e6937b4e0d2c9df3fde3470bdc72c9 (patch) | |
tree | 8f71a9f272082dd9ee0e471ef5fcb9f19519600d /src/mongo/watchdog/watchdog.cpp | |
parent | f210bc645453c05979067c556bf6f2bd43e64134 (diff) | |
download | mongo-bf5bef47a8e6937b4e0d2c9df3fde3470bdc72c9.tar.gz |
SERVER-42165 Replace uses of stdx::mutex with mongo::Mutex
Diffstat (limited to 'src/mongo/watchdog/watchdog.cpp')
-rw-r--r-- | src/mongo/watchdog/watchdog.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/watchdog/watchdog.cpp b/src/mongo/watchdog/watchdog.cpp index 809403ceb51..3dff62a1086 100644 --- a/src/mongo/watchdog/watchdog.cpp +++ b/src/mongo/watchdog/watchdog.cpp @@ -61,7 +61,7 @@ WatchdogPeriodicThread::WatchdogPeriodicThread(Milliseconds period, StringData t void WatchdogPeriodicThread::start() { { - stdx::lock_guard<stdx::mutex> lock(_mutex); + stdx::lock_guard<Latch> lock(_mutex); invariant(_state == State::kNotStarted); _state = State::kStarted; @@ -76,7 +76,7 @@ void WatchdogPeriodicThread::shutdown() { stdx::thread thread; { - stdx::lock_guard<stdx::mutex> lock(_mutex); + stdx::lock_guard<Latch> lock(_mutex); bool started = (_state == State::kStarted); @@ -101,7 +101,7 @@ void WatchdogPeriodicThread::shutdown() { } void WatchdogPeriodicThread::setPeriod(Milliseconds period) { - stdx::lock_guard<stdx::mutex> lock(_mutex); + stdx::lock_guard<Latch> lock(_mutex); bool wasEnabled = _enabled; @@ -130,7 +130,7 @@ void WatchdogPeriodicThread::doLoop() { auto preciseClockSource = client->getServiceContext()->getPreciseClockSource(); { - stdx::lock_guard<stdx::mutex> lock(_mutex); + stdx::lock_guard<Latch> lock(_mutex); // Ensure state is starting from a clean slate. resetState(); @@ -144,7 +144,7 @@ void WatchdogPeriodicThread::doLoop() { Date_t startTime = preciseClockSource->now(); { - stdx::unique_lock<stdx::mutex> lock(_mutex); + stdx::unique_lock<Latch> lock(_mutex); MONGO_IDLE_THREAD_BLOCK; @@ -257,7 +257,7 @@ void WatchdogMonitor::start() { _watchdogMonitorThread.start(); { - stdx::lock_guard<stdx::mutex> lock(_mutex); + stdx::lock_guard<Latch> lock(_mutex); invariant(_state == State::kNotStarted); _state = State::kStarted; @@ -266,7 +266,7 @@ void WatchdogMonitor::start() { void WatchdogMonitor::setPeriod(Milliseconds duration) { { - stdx::lock_guard<stdx::mutex> lock(_mutex); + stdx::lock_guard<Latch> lock(_mutex); if (duration > Milliseconds(0)) { dassert(duration >= Milliseconds(1)); @@ -290,7 +290,7 @@ void WatchdogMonitor::setPeriod(Milliseconds duration) { void WatchdogMonitor::shutdown() { { - stdx::lock_guard<stdx::mutex> lock(_mutex); + stdx::lock_guard<Latch> lock(_mutex); bool started = (_state == State::kStarted); |