summaryrefslogtreecommitdiff
path: root/src/mongo/logger/ramlog.cpp
diff options
context:
space:
mode:
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();
}