From 7cd9cf303c824478f0f6d60cadfcc1a25bdb21f2 Mon Sep 17 00:00:00 2001 From: Andy Schwerin Date: Fri, 27 Feb 2015 18:33:28 -0500 Subject: SERVER-17310 Make mongo::mutex a typedef of boost::mutex and remove mongo::scoped_lock. --- src/mongo/logger/ramlog.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mongo/logger/ramlog.cpp') diff --git a/src/mongo/logger/ramlog.cpp b/src/mongo/logger/ramlog.cpp index 36ac1ef5023..0ea9e324d96 100644 --- a/src/mongo/logger/ramlog.cpp +++ b/src/mongo/logger/ramlog.cpp @@ -206,10 +206,10 @@ namespace { RamLog* RamLog::get(const std::string& name) { if (!_namedLock) { // Guaranteed to happen before multi-threaded operation. - _namedLock = new mongo::mutex("RamLog::_namedLock"); + _namedLock = new mongo::mutex(); } - scoped_lock lk( *_namedLock ); + boost::lock_guard lk( *_namedLock ); if (!_named) { // Guaranteed to happen before multi-threaded operation. _named = new RM(); @@ -226,7 +226,7 @@ namespace { RamLog* RamLog::getIfExists(const std::string& name) { if (!_named) return NULL; - scoped_lock lk(*_namedLock); + boost::lock_guard lk(*_namedLock); return mapFindWithDefault(*_named, name, static_cast(NULL)); } @@ -234,7 +234,7 @@ namespace { if ( ! _named ) return; - scoped_lock lk( *_namedLock ); + boost::lock_guard lk( *_namedLock ); for ( RM::iterator i=_named->begin(); i!=_named->end(); ++i ) { if ( i->second->n ) names.push_back( i->first ); @@ -251,7 +251,7 @@ namespace { return Status(ErrorCodes::InternalError, "Inconsistent intiailization of RamLogCatalog."); } - _namedLock = new mongo::mutex("RamLog::_namedLock"); + _namedLock = new mongo::mutex(); _named = new RM(); } -- cgit v1.2.1