diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-10-10 17:38:54 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-10-11 17:15:35 -0400 |
commit | 7aa132c8087193f3efa23867b8783a0b7ad5a267 (patch) | |
tree | c6d36b0a001811a8fbb7e6d485762045c1f8a221 /src/mongo/dbtests/threadedtests.cpp | |
parent | 22b368a74b36896de6b164c55cd4b3b9ca562bb2 (diff) | |
download | mongo-7aa132c8087193f3efa23867b8783a0b7ad5a267.tar.gz |
SERVER-14425 Make MMAP V1 code in LockerImpl conditionally compiled
This change cuts down on the locking work that other storage engines have
to do.
Diffstat (limited to 'src/mongo/dbtests/threadedtests.cpp')
-rw-r--r-- | src/mongo/dbtests/threadedtests.cpp | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/src/mongo/dbtests/threadedtests.cpp b/src/mongo/dbtests/threadedtests.cpp index 9508aef094d..ed6bb46dfd3 100644 --- a/src/mongo/dbtests/threadedtests.cpp +++ b/src/mongo/dbtests/threadedtests.cpp @@ -113,7 +113,7 @@ namespace ThreadedTests { virtual void subthread(int tnumber) { Client::initThread("mongomutextest"); - LockerImpl lockState; + LockerImpl<true> lockState; mongo::unittest::log().stream() << "Thread " << boost::this_thread::get_id() @@ -234,11 +234,11 @@ namespace ThreadedTests { virtual void validate() { { - LockerImpl ls; + LockerImpl<true> ls; Lock::GlobalWrite w(&ls); } { - LockerImpl ls; + LockerImpl<true> ls; Lock::GlobalRead r(&ls); } } @@ -320,23 +320,6 @@ namespace ThreadedTests { } }; - class LockTest { - public: - void run() { - // quick atomicint wrap test - // MSGID likely assumes this semantic - AtomicUInt32 counter(0xffffffff); - counter.fetchAndAdd(1); - ASSERT_EQUALS(counter.load(), 0U); - - LockerImpl lockState; - writelocktry lk(&lockState, 0); - - ASSERT( lk.got() ); - ASSERT( lockState.isW() ); - } - }; - class RWLockTest1 { public: void run() { @@ -901,8 +884,6 @@ namespace ThreadedTests { add< IsAtomicWordAtomic<AtomicUInt64> >(); add< MVarTest >(); add< ThreadPoolTest >(); - add< LockTest >(); - add< RWLockTest1 >(); add< RWLockTest2 >(); |