summaryrefslogtreecommitdiff
path: root/src/mongo/logger/ramlog.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2015-02-27 18:33:28 -0500
committerAndy Schwerin <schwerin@mongodb.com>2015-03-12 17:11:20 -0400
commit7cd9cf303c824478f0f6d60cadfcc1a25bdb21f2 (patch)
treeebeec8c3c2dc21359b941d95e2109e355542e65f /src/mongo/logger/ramlog.cpp
parent7ee3d124070db157181bc1b24f2b84913957c388 (diff)
downloadmongo-7cd9cf303c824478f0f6d60cadfcc1a25bdb21f2.tar.gz
SERVER-17310 Make mongo::mutex a typedef of boost::mutex and remove mongo::scoped_lock.
Diffstat (limited to 'src/mongo/logger/ramlog.cpp')
-rw-r--r--src/mongo/logger/ramlog.cpp10
1 files changed, 5 insertions, 5 deletions
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<boost::mutex> 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<boost::mutex> lk(*_namedLock);
return mapFindWithDefault(*_named, name, static_cast<RamLog*>(NULL));
}
@@ -234,7 +234,7 @@ namespace {
if ( ! _named )
return;
- scoped_lock lk( *_namedLock );
+ boost::lock_guard<boost::mutex> 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();
}