diff options
author | Andrew Morrow <acm@mongodb.com> | 2015-06-18 15:02:54 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2015-06-19 22:51:28 -0400 |
commit | 1178eff1ddf60a7dac3a8cd71e2fdd278aa01b52 (patch) | |
tree | ee3096045eb4d2e4f69d57ef85c66b3be69e4302 /src/mongo/db/stats/top.cpp | |
parent | 4b5fa5fc711e4cf94291665575fd1c742ad3e7c3 (diff) | |
download | mongo-1178eff1ddf60a7dac3a8cd71e2fdd278aa01b52.tar.gz |
SERVER-19041 Simplify SimpleMutex
Diffstat (limited to 'src/mongo/db/stats/top.cpp')
-rw-r--r-- | src/mongo/db/stats/top.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/stats/top.cpp b/src/mongo/db/stats/top.cpp index af793f9401a..903378e1834 100644 --- a/src/mongo/db/stats/top.cpp +++ b/src/mongo/db/stats/top.cpp @@ -80,7 +80,7 @@ namespace { return; //cout << "record: " << ns << "\t" << op << "\t" << command << endl; - SimpleMutex::scoped_lock lk(_lock); + stdx::lock_guard<SimpleMutex> lk(_lock); if ( ( command || op == dbQuery ) && ns == _lastDropped ) { _lastDropped = ""; @@ -138,18 +138,18 @@ namespace { } void Top::collectionDropped( StringData ns ) { - SimpleMutex::scoped_lock lk(_lock); + stdx::lock_guard<SimpleMutex> lk(_lock); _usage.erase(ns); _lastDropped = ns.toString(); } void Top::cloneMap(Top::UsageMap& out) const { - SimpleMutex::scoped_lock lk(_lock); + stdx::lock_guard<SimpleMutex> lk(_lock); out = _usage; } void Top::append( BSONObjBuilder& b ) { - SimpleMutex::scoped_lock lk( _lock ); + stdx::lock_guard<SimpleMutex> lk( _lock ); _appendToUsageMap( b, _usage ); } |