summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeert Bosch <geert@mongodb.com>2016-03-09 18:31:56 -0500
committerGeert Bosch <geert@mongodb.com>2016-03-09 18:31:56 -0500
commitc25a6ab4aa9ea9e3a059235d55aca6ea13c59363 (patch)
treecbcba09564f19978d93357241286cb4bc98b0632 /src
parentb3ff84828ceac501783203480b09cfee8c811a02 (diff)
downloadmongo-c25a6ab4aa9ea9e3a059235d55aca6ea13c59363.tar.gz
SERVER-20524: Remove unused Locker::hasStrongLocks() method
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/concurrency/lock_state.cpp18
-rw-r--r--src/mongo/db/concurrency/lock_state.h2
-rw-r--r--src/mongo/db/concurrency/locker.h6
-rw-r--r--src/mongo/db/concurrency/locker_noop.h4
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