diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/concurrency/lock_state.cpp | 18 | ||||
-rw-r--r-- | src/mongo/db/concurrency/lock_state.h | 2 | ||||
-rw-r--r-- | src/mongo/db/concurrency/locker.h | 6 | ||||
-rw-r--r-- | src/mongo/db/concurrency/locker_noop.h | 4 |
4 files changed, 0 insertions, 30 deletions
diff --git a/src/mongo/db/concurrency/lock_state.cpp b/src/mongo/db/concurrency/lock_state.cpp index cf3fee8f2c8..a1da8b0075e 100644 --- a/src/mongo/db/concurrency/lock_state.cpp +++ b/src/mongo/db/concurrency/lock_state.cpp @@ -822,24 +822,6 @@ LockMode LockerImpl<IsForMMAPV1>::_getModeForMMAPV1FlushLock() const { } } -template <bool IsForMMAPV1> -bool LockerImpl<IsForMMAPV1>::hasStrongLocks() const { - if (!isLocked()) - return false; - - stdx::lock_guard<SpinLock> lk(_lock); - LockRequestsMap::ConstIterator it = _requests.begin(); - while (!it.finished()) { - if (it->mode == MODE_X || it->mode == MODE_S) { - return true; - } - - it.next(); - } - - return false; -} - // // Auto classes diff --git a/src/mongo/db/concurrency/lock_state.h b/src/mongo/db/concurrency/lock_state.h index 57b55809db9..b876e8badd4 100644 --- a/src/mongo/db/concurrency/lock_state.h +++ b/src/mongo/db/concurrency/lock_state.h @@ -252,8 +252,6 @@ public: return _batchWriter; } - virtual bool hasStrongLocks() const; - private: bool _batchWriter; }; diff --git a/src/mongo/db/concurrency/locker.h b/src/mongo/db/concurrency/locker.h index e52df884264..3e50e41b545 100644 --- a/src/mongo/db/concurrency/locker.h +++ b/src/mongo/db/concurrency/locker.h @@ -304,12 +304,6 @@ public: virtual void setIsBatchWriter(bool newValue) = 0; virtual bool isBatchWriter() const = 0; - /** - * A string lock is MODE_X or MODE_S. - * These are incompatible with other locks and therefore are strong. - */ - virtual bool hasStrongLocks() const = 0; - protected: Locker() {} }; diff --git a/src/mongo/db/concurrency/locker_noop.h b/src/mongo/db/concurrency/locker_noop.h index 9be6be8c1ce..50f2dbe3321 100644 --- a/src/mongo/db/concurrency/locker_noop.h +++ b/src/mongo/db/concurrency/locker_noop.h @@ -167,10 +167,6 @@ public: virtual bool isBatchWriter() const { invariant(false); } - - virtual bool hasStrongLocks() const { - return false; - } }; } // namespace mongo |