summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2015-06-23 22:27:18 -0400
committerAndrew Morrow <acm@mongodb.com>2015-06-30 12:16:56 -0400
commitd879ba7b97b52e7f54bd93d0fdc147b127f87ece (patch)
treeb915369e2b6ae95fff846aed4656a5701dd09ad4 /src
parent6abd1d0e9cdc691e6daf30ce3316ffb820b9bb70 (diff)
downloadmongo-d879ba7b97b52e7f54bd93d0fdc147b127f87ece.tar.gz
SERVER-19099 Enforce polyfill usage via lint
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp6
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.h4
-rw-r--r--src/mongo/dbtests/perftests.cpp16
-rw-r--r--src/mongo/stdx/chrono.h2
-rw-r--r--src/mongo/stdx/condition_variable.h6
-rw-r--r--src/mongo/stdx/functional.h10
-rw-r--r--src/mongo/stdx/future.h12
-rw-r--r--src/mongo/stdx/memory.h4
-rw-r--r--src/mongo/stdx/mutex.h16
-rw-r--r--src/mongo/stdx/thread.h4
-rw-r--r--src/mongo/util/concurrency/rwlockimpl.h6
11 files changed, 43 insertions, 43 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp
index 2bb1c0c0b99..1401ea80108 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp
@@ -149,7 +149,7 @@ void WiredTigerSessionCache::shuttingDown() {
// This ensures that any calls, which are currently inside of getSession/releaseSession
// will be able to complete before we start cleaning up the pool. Any others, which are
// about to enter will return immediately because of _shuttingDown == true.
- stdx::lock_guard<boost::shared_mutex> lk(_shutdownLock);
+ stdx::lock_guard<boost::shared_mutex> lk(_shutdownLock); // NOLINT
}
closeAll();
@@ -172,7 +172,7 @@ void WiredTigerSessionCache::closeAll() {
}
WiredTigerSession* WiredTigerSessionCache::getSession() {
- boost::shared_lock<boost::shared_mutex> shutdownLock(_shutdownLock);
+ boost::shared_lock<boost::shared_mutex> shutdownLock(_shutdownLock); // NOLINT
// We should never be able to get here after _shuttingDown is set, because no new
// operations should be allowed to start.
@@ -203,7 +203,7 @@ void WiredTigerSessionCache::releaseSession(WiredTigerSession* session) {
invariant(session);
invariant(session->cursorsOut() == 0);
- boost::shared_lock<boost::shared_mutex> shutdownLock(_shutdownLock);
+ boost::shared_lock<boost::shared_mutex> shutdownLock(_shutdownLock); // NOLINT
if (_shuttingDown.loadRelaxed()) {
// Leak the session in order to avoid race condition with clean shutdown, where the
// storage engine is ripped from underneath transactions, which are not "active"
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.h b/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.h
index 9760e6e48f9..546b1797b6c 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.h
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.h
@@ -148,8 +148,8 @@ private:
// Regular operations take it in shared mode. Shutdown sets the _shuttingDown flag and
// then takes it in exclusive mode. This ensures that all threads, which would return
// sessions to the cache would leak them.
- boost::shared_mutex _shutdownLock;
- AtomicUInt32 _shuttingDown; // Used as boolean - 0 = false, 1 = true
+ boost::shared_mutex _shutdownLock; // NOLINT
+ AtomicUInt32 _shuttingDown; // Used as boolean - 0 = false, 1 = true
SpinLock _cacheLock;
typedef std::list<WiredTigerSession*> SessionCache;
diff --git a/src/mongo/dbtests/perftests.cpp b/src/mongo/dbtests/perftests.cpp
index d2e0a8009e6..5021eff0558 100644
--- a/src/mongo/dbtests/perftests.cpp
+++ b/src/mongo/dbtests/perftests.cpp
@@ -605,10 +605,10 @@ public:
RWLock lk("testrw");
SimpleMutex m;
-boost::mutex mboost;
-boost::timed_mutex mboost_timed;
-std::mutex mstd;
-std::timed_mutex mstd_timed;
+boost::mutex mboost; // NOLINT
+boost::timed_mutex mboost_timed; // NOLINT
+std::mutex mstd; // NOLINT
+std::timed_mutex mstd_timed; // NOLINT
SpinLock s;
stdx::condition_variable c;
@@ -639,7 +639,7 @@ public:
return false;
}
void timed() {
- boost::lock_guard<boost::mutex> lk(mboost);
+ boost::lock_guard<boost::mutex> lk(mboost); // NOLINT
}
};
class boosttimed_mutexspeed : public B {
@@ -654,7 +654,7 @@ public:
return false;
}
void timed() {
- boost::lock_guard<boost::timed_mutex> lk(mboost_timed);
+ boost::lock_guard<boost::timed_mutex> lk(mboost_timed); // NOLINT
}
};
class simplemutexspeed : public B {
@@ -685,7 +685,7 @@ public:
return false;
}
void timed() {
- std::lock_guard<std::mutex> lk(mstd);
+ std::lock_guard<std::mutex> lk(mstd); // NOLINT
}
};
class stdtimed_mutexspeed : public B {
@@ -700,7 +700,7 @@ public:
return false;
}
void timed() {
- std::lock_guard<std::timed_mutex> lk(mstd_timed);
+ std::lock_guard<std::timed_mutex> lk(mstd_timed); // NOLINT
}
};
diff --git a/src/mongo/stdx/chrono.h b/src/mongo/stdx/chrono.h
index 797b5d3b963..47ab2a2d231 100644
--- a/src/mongo/stdx/chrono.h
+++ b/src/mongo/stdx/chrono.h
@@ -33,7 +33,7 @@
namespace mongo {
namespace stdx {
-namespace chrono = boost::chrono;
+namespace chrono = boost::chrono; // NOLINT
} // namespace stdx
} // namespace mongo
diff --git a/src/mongo/stdx/condition_variable.h b/src/mongo/stdx/condition_variable.h
index e3d77a853a8..206a9e84465 100644
--- a/src/mongo/stdx/condition_variable.h
+++ b/src/mongo/stdx/condition_variable.h
@@ -33,9 +33,9 @@
namespace mongo {
namespace stdx {
-using condition_variable = boost::condition_variable;
-using condition_variable_any = boost::condition_variable_any;
-using cv_status = boost::cv_status;
+using condition_variable = boost::condition_variable; // NOLINT
+using condition_variable_any = boost::condition_variable_any; // NOLINT
+using cv_status = boost::cv_status; // NOLINT
} // namespace stdx
} // namespace mongo
diff --git a/src/mongo/stdx/functional.h b/src/mongo/stdx/functional.h
index d86973b2066..c20f6e21310 100644
--- a/src/mongo/stdx/functional.h
+++ b/src/mongo/stdx/functional.h
@@ -42,9 +42,9 @@
namespace mongo {
namespace stdx {
-using ::std::bind;
-using ::std::function;
-namespace placeholders = ::std::placeholders;
+using ::std::bind; // NOLINT
+using ::std::function; // NOLINT
+namespace placeholders = ::std::placeholders; // NOLINT
} // namespace stdx
} // namespace mongo
@@ -57,8 +57,8 @@ namespace placeholders = ::std::placeholders;
namespace mongo {
namespace stdx {
-using boost::bind;
-using boost::function;
+using boost::bind; // NOLINT
+using boost::function; // NOLINT
namespace placeholders {
static boost::arg<1> _1;
diff --git a/src/mongo/stdx/future.h b/src/mongo/stdx/future.h
index bbc46efac14..bc4816aff6f 100644
--- a/src/mongo/stdx/future.h
+++ b/src/mongo/stdx/future.h
@@ -33,12 +33,12 @@
namespace mongo {
namespace stdx {
-using boost::async;
-using boost::future;
-using boost::future_status;
-using boost::launch;
-using boost::packaged_task;
-using boost::promise;
+using boost::async; // NOLINT
+using boost::future; // NOLINT
+using boost::future_status; // NOLINT
+using boost::launch; // NOLINT
+using boost::packaged_task; // NOLINT
+using boost::promise; // NOLINT
} // namespace stdx
} // namespace mongo
diff --git a/src/mongo/stdx/memory.h b/src/mongo/stdx/memory.h
index 1c4f512dc5a..83793f86c5a 100644
--- a/src/mongo/stdx/memory.h
+++ b/src/mongo/stdx/memory.h
@@ -37,7 +37,7 @@
namespace mongo {
namespace stdx {
-using ::std::make_unique;
+using ::std::make_unique; // NOLINT
} // namespace stdx
} // namespace mongo
@@ -49,7 +49,7 @@ using ::std::make_unique;
namespace mongo {
namespace stdx {
-using boost::make_unique;
+using boost::make_unique; // NOLINT
} // namespace stdx
} // namespace mongo
diff --git a/src/mongo/stdx/mutex.h b/src/mongo/stdx/mutex.h
index 9dc0f0c07b1..4303d25fba2 100644
--- a/src/mongo/stdx/mutex.h
+++ b/src/mongo/stdx/mutex.h
@@ -35,16 +35,16 @@
namespace mongo {
namespace stdx {
-using boost::mutex;
-using boost::timed_mutex;
-using boost::recursive_mutex;
+using boost::mutex; // NOLINT
+using boost::timed_mutex; // NOLINT
+using boost::recursive_mutex; // NOLINT
-using boost::adopt_lock_t;
-using boost::defer_lock_t;
-using boost::try_to_lock_t;
+using boost::adopt_lock_t; // NOLINT
+using boost::defer_lock_t; // NOLINT
+using boost::try_to_lock_t; // NOLINT
-using boost::lock_guard;
-using boost::unique_lock;
+using boost::lock_guard; // NOLINT
+using boost::unique_lock; // NOLINT
#if _MSC_VER < 1900
#define MONGO_STDX_CONSTEXPR const
diff --git a/src/mongo/stdx/thread.h b/src/mongo/stdx/thread.h
index 3b9490b2d67..e46900c02a3 100644
--- a/src/mongo/stdx/thread.h
+++ b/src/mongo/stdx/thread.h
@@ -33,8 +33,8 @@
namespace mongo {
namespace stdx {
-using thread = boost::thread;
-namespace this_thread = boost::this_thread;
+using thread = boost::thread; // NOLINT
+namespace this_thread = boost::this_thread; // NOLINT
} // namespace stdx
} // namespace mongo
diff --git a/src/mongo/util/concurrency/rwlockimpl.h b/src/mongo/util/concurrency/rwlockimpl.h
index d0d4c8fad99..40103080911 100644
--- a/src/mongo/util/concurrency/rwlockimpl.h
+++ b/src/mongo/util/concurrency/rwlockimpl.h
@@ -125,7 +125,7 @@ using rwlock_underlying_shared_mutex = boost::modified_shared_mutex;
#include <boost/thread/shared_mutex.hpp>
namespace mongo {
namespace detail {
-using rwlock_underlying_shared_mutex = boost::shared_mutex;
+using rwlock_underlying_shared_mutex = boost::shared_mutex; // NOLINT
} // namespace detail
} // namespace mongo
#endif
@@ -164,14 +164,14 @@ protected:
#if defined(_WIN32)
return _m.timed_lock_shared(boost::posix_time::milliseconds(millis));
#else
- return _m.try_lock_shared_for(boost::chrono::milliseconds(millis));
+ return _m.try_lock_shared_for(boost::chrono::milliseconds(millis)); // NOLINT
#endif
}
bool lock_try(int millis = 0) {
#if defined(_WIN32)
return _m.timed_lock(boost::posix_time::milliseconds(millis));
#else
- return _m.try_lock_for(boost::chrono::milliseconds(millis));
+ return _m.try_lock_for(boost::chrono::milliseconds(millis)); // NOLINT
#endif
}