summaryrefslogtreecommitdiff
path: root/src/mongo/util/concurrency/mutex.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2014-01-24 17:01:11 -0500
committerEliot Horowitz <eliot@10gen.com>2014-01-24 18:17:18 -0500
commit81fd5b90caed8970e4190a3286e4741567009b21 (patch)
treeb683b583f29db081152926304541be678c0926de /src/mongo/util/concurrency/mutex.h
parent56e6f5ac4bbff54b95ce956823e4b80fc6769bc9 (diff)
downloadmongo-81fd5b90caed8970e4190a3286e4741567009b21.tar.gz
SERVER-12265: for SimpleMutex, change name from char* to StringData
Diffstat (limited to 'src/mongo/util/concurrency/mutex.h')
-rw-r--r--src/mongo/util/concurrency/mutex.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/util/concurrency/mutex.h b/src/mongo/util/concurrency/mutex.h
index 26e65056043..118c9a40d30 100644
--- a/src/mongo/util/concurrency/mutex.h
+++ b/src/mongo/util/concurrency/mutex.h
@@ -139,7 +139,7 @@ namespace mongo {
#if defined(_WIN32)
class SimpleMutex : boost::noncopyable {
public:
- SimpleMutex( const char * ) { InitializeCriticalSection( &_cs ); }
+ SimpleMutex( const StringData& ) { InitializeCriticalSection( &_cs ); }
void dassertLocked() const { }
void lock() { EnterCriticalSection( &_cs ); }
void unlock() { LeaveCriticalSection( &_cs ); }
@@ -158,7 +158,7 @@ namespace mongo {
class SimpleMutex : boost::noncopyable {
public:
void dassertLocked() const { }
- SimpleMutex(const char* name) { verify( pthread_mutex_init(&_lock,0) == 0 ); }
+ SimpleMutex(const StringData& name) { verify( pthread_mutex_init(&_lock,0) == 0 ); }
~SimpleMutex(){
if ( ! StaticObserver::_destroyingStatics ) {
verify( pthread_mutex_destroy(&_lock) == 0 );
@@ -186,7 +186,7 @@ namespace mongo {
*/
class RecursiveMutex : boost::noncopyable {
public:
- RecursiveMutex(const char* name) : m(name) { }
+ RecursiveMutex(const StringData& name) : m(name) { }
bool isLocked() const { return n.get() > 0; }
class scoped_lock : boost::noncopyable {
RecursiveMutex& rm;