summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorADAM David Alan Martin <adam.martin@10gen.com>2019-06-10 01:22:52 -0400
committerADAM David Alan Martin <adam.martin@10gen.com>2019-06-10 01:59:44 -0400
commitdd6e5dfed2c566cb5778dab7421654d310ce6480 (patch)
tree65962a27a5209ded257a5d7547bdff974a64c465
parentc36f9ecb91e49da7e637863889804fc4e6c6c05e (diff)
downloadmongo-dd6e5dfed2c566cb5778dab7421654d310ce6480.tar.gz
SERVER-39340 Remove `stdx/list.h`
-rw-r--r--src/mongo/client/connection_pool.h4
-rw-r--r--src/mongo/client/replica_set_monitor_internal.h8
-rw-r--r--src/mongo/db/auth/user_set.h8
-rw-r--r--src/mongo/db/service_context.cpp4
-rw-r--r--src/mongo/db/service_context.h4
-rw-r--r--src/mongo/executor/network_interface_mock.h4
-rw-r--r--src/mongo/executor/thread_pool_task_executor.h6
-rw-r--r--src/mongo/s/sharding_task_executor.h2
-rw-r--r--src/mongo/stdx/list.h40
-rw-r--r--src/mongo/transport/service_entry_point_impl.h4
-rw-r--r--src/mongo/transport/service_executor_adaptive.h4
11 files changed, 24 insertions, 64 deletions
diff --git a/src/mongo/client/connection_pool.h b/src/mongo/client/connection_pool.h
index 5d72f5c25e1..1bcada49dcd 100644
--- a/src/mongo/client/connection_pool.h
+++ b/src/mongo/client/connection_pool.h
@@ -29,10 +29,10 @@
#pragma once
+#include <list>
#include <map>
#include "mongo/client/dbclient_connection.h"
-#include "mongo/stdx/list.h"
#include "mongo/stdx/mutex.h"
#include "mongo/stdx/unordered_map.h"
#include "mongo/util/net/hostandport.h"
@@ -67,7 +67,7 @@ public:
const Date_t creationDate;
};
- typedef stdx::list<ConnectionInfo> ConnectionList;
+ typedef std::list<ConnectionInfo> ConnectionList;
typedef stdx::unordered_map<HostAndPort, ConnectionList> HostConnectionMap;
typedef std::map<HostAndPort, Date_t> HostLastUsedMap;
diff --git a/src/mongo/client/replica_set_monitor_internal.h b/src/mongo/client/replica_set_monitor_internal.h
index c4a90b47d79..e7a57cc6543 100644
--- a/src/mongo/client/replica_set_monitor_internal.h
+++ b/src/mongo/client/replica_set_monitor_internal.h
@@ -241,10 +241,10 @@ public:
mutable PseudoRandom rand; // only used for host selection to balance load
// For scheduling scans
- Seconds refreshPeriod; // Normal refresh period when not expedited
- bool isExpedited = false; // True when we are doing more frequent refreshes due to waiters
- stdx::list<Waiter> waiters; // Everyone waiting for some ReadPreference to be satisfied
- ScanStatePtr currentScan; // NULL if no scan in progress
+ Seconds refreshPeriod; // Normal refresh period when not expedited
+ bool isExpedited = false; // True when we are doing more frequent refreshes due to waiters
+ std::list<Waiter> waiters; // Everyone waiting for some ReadPreference to be satisfied
+ ScanStatePtr currentScan; // NULL if no scan in progress
};
struct ReplicaSetMonitor::ScanState {
diff --git a/src/mongo/db/auth/user_set.h b/src/mongo/db/auth/user_set.h
index b4e88f7bbd7..25ecd841d89 100644
--- a/src/mongo/db/auth/user_set.h
+++ b/src/mongo/db/auth/user_set.h
@@ -29,6 +29,7 @@
#pragma once
+#include <list>
#include <string>
#include <vector>
@@ -36,7 +37,6 @@
#include "mongo/db/auth/authorization_manager.h"
#include "mongo/db/auth/user.h"
#include "mongo/db/auth/user_name.h"
-#include "mongo/stdx/list.h"
namespace mongo {
@@ -50,8 +50,8 @@ class UserSet {
UserSet& operator=(const UserSet&) = delete;
public:
- using iterator = stdx::list<UserHandle>::iterator;
- using const_iterator = stdx::list<UserHandle>::const_iterator;
+ using iterator = std::list<UserHandle>::iterator;
+ using const_iterator = std::list<UserHandle>::const_iterator;
UserSet() = default;
@@ -112,7 +112,7 @@ public:
private:
// The UserSet maintains ownership of the Users in it, and is responsible for
// returning them to the AuthorizationManager when done with them.
- stdx::list<UserHandle> _users;
+ std::list<UserHandle> _users;
};
} // namespace mongo
diff --git a/src/mongo/db/service_context.cpp b/src/mongo/db/service_context.cpp
index d86176e0c03..350e9eae02e 100644
--- a/src/mongo/db/service_context.cpp
+++ b/src/mongo/db/service_context.cpp
@@ -33,6 +33,7 @@
#include "mongo/db/service_context.h"
+#include <list>
#include <memory>
#include "mongo/base/init.h"
@@ -43,7 +44,6 @@
#include "mongo/db/op_observer.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/storage/recovery_unit_noop.h"
-#include "mongo/stdx/list.h"
#include "mongo/transport/service_entry_point.h"
#include "mongo/transport/session.h"
#include "mongo/transport/transport_layer.h"
@@ -56,7 +56,7 @@
namespace mongo {
namespace {
-using ConstructorActionList = stdx::list<ServiceContext::ConstructorDestructorActions>;
+using ConstructorActionList = std::list<ServiceContext::ConstructorDestructorActions>;
ServiceContext* globalServiceContext = nullptr;
diff --git a/src/mongo/db/service_context.h b/src/mongo/db/service_context.h
index d3af86ac8fc..d122a32e5e3 100644
--- a/src/mongo/db/service_context.h
+++ b/src/mongo/db/service_context.h
@@ -31,6 +31,7 @@
#include <boost/optional.hpp>
#include <functional>
+#include <list>
#include <memory>
#include <vector>
@@ -39,7 +40,6 @@
#include "mongo/db/storage/storage_engine.h"
#include "mongo/platform/atomic_word.h"
#include "mongo/stdx/condition_variable.h"
-#include "mongo/stdx/list.h"
#include "mongo/stdx/mutex.h"
#include "mongo/stdx/unordered_set.h"
#include "mongo/transport/service_executor.h"
@@ -271,7 +271,7 @@ public:
DestructorAction destructor = {});
private:
- using ConstructorActionListIterator = stdx::list<ConstructorDestructorActions>::iterator;
+ using ConstructorActionListIterator = std::list<ConstructorDestructorActions>::iterator;
ConstructorActionListIterator _iter;
boost::optional<GlobalInitializerRegisterer> _registerer;
};
diff --git a/src/mongo/executor/network_interface_mock.h b/src/mongo/executor/network_interface_mock.h
index 05742d67cc0..8fe6cdb3414 100644
--- a/src/mongo/executor/network_interface_mock.h
+++ b/src/mongo/executor/network_interface_mock.h
@@ -29,6 +29,7 @@
#pragma once
+#include <list>
#include <memory>
#include <queue>
#include <utility>
@@ -37,7 +38,6 @@
#include "mongo/executor/network_interface.h"
#include "mongo/rpc/metadata/metadata_hook.h"
#include "mongo/stdx/condition_variable.h"
-#include "mongo/stdx/list.h"
#include "mongo/stdx/mutex.h"
#include "mongo/stdx/unordered_map.h"
#include "mongo/stdx/unordered_set.h"
@@ -76,7 +76,7 @@ class NetworkConnectionHook;
class NetworkInterfaceMock : public NetworkInterface {
public:
class NetworkOperation;
- using NetworkOperationList = stdx::list<NetworkOperation>;
+ using NetworkOperationList = std::list<NetworkOperation>;
using NetworkOperationIterator = NetworkOperationList::iterator;
NetworkInterfaceMock();
diff --git a/src/mongo/executor/thread_pool_task_executor.h b/src/mongo/executor/thread_pool_task_executor.h
index 8285785d748..218987383cb 100644
--- a/src/mongo/executor/thread_pool_task_executor.h
+++ b/src/mongo/executor/thread_pool_task_executor.h
@@ -29,11 +29,11 @@
#pragma once
+#include <list>
#include <memory>
#include "mongo/executor/task_executor.h"
#include "mongo/stdx/condition_variable.h"
-#include "mongo/stdx/list.h"
#include "mongo/stdx/mutex.h"
#include "mongo/stdx/thread.h"
#include "mongo/transport/baton.h"
@@ -102,8 +102,8 @@ public:
private:
class CallbackState;
class EventState;
- using WorkQueue = stdx::list<std::shared_ptr<CallbackState>>;
- using EventList = stdx::list<std::shared_ptr<EventState>>;
+ using WorkQueue = std::list<std::shared_ptr<CallbackState>>;
+ using EventList = std::list<std::shared_ptr<EventState>>;
/**
* Representation of the stage of life of a thread pool.
diff --git a/src/mongo/s/sharding_task_executor.h b/src/mongo/s/sharding_task_executor.h
index 4e96d412149..0f034d144f1 100644
--- a/src/mongo/s/sharding_task_executor.h
+++ b/src/mongo/s/sharding_task_executor.h
@@ -29,12 +29,12 @@
#pragma once
+#include <list>
#include <memory>
#include "mongo/base/status_with.h"
#include "mongo/executor/task_executor.h"
#include "mongo/stdx/condition_variable.h"
-#include "mongo/stdx/list.h"
#include "mongo/stdx/mutex.h"
namespace mongo {
diff --git a/src/mongo/stdx/list.h b/src/mongo/stdx/list.h
deleted file mode 100644
index 0b898303038..00000000000
--- a/src/mongo/stdx/list.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Copyright (C) 2018-present MongoDB, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the Server Side Public License, version 1,
- * as published by MongoDB, Inc.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * Server Side Public License for more details.
- *
- * You should have received a copy of the Server Side Public License
- * along with this program. If not, see
- * <http://www.mongodb.com/licensing/server-side-public-license>.
- *
- * As a special exception, the copyright holders give permission to link the
- * code of portions of this program with the OpenSSL library under certain
- * conditions as described in each individual source file and distribute
- * linked combinations including the program with the OpenSSL library. You
- * must comply with the Server Side Public License in all respects for
- * all of the code used other than as permitted herein. If you modify file(s)
- * with this exception, you may extend this exception to your version of the
- * file(s), but you are not obligated to do so. If you do not wish to do so,
- * delete this exception statement from your version. If you delete this
- * exception statement from all source files in the program, then also delete
- * it in the license file.
- */
-
-#pragma once
-
-#include <list>
-
-namespace mongo {
-namespace stdx {
-
-using std::list;
-
-} // namespace stdx
-} // namespace mongo
diff --git a/src/mongo/transport/service_entry_point_impl.h b/src/mongo/transport/service_entry_point_impl.h
index 87a8d815c91..2e3f5219e21 100644
--- a/src/mongo/transport/service_entry_point_impl.h
+++ b/src/mongo/transport/service_entry_point_impl.h
@@ -29,10 +29,10 @@
#pragma once
+#include <list>
#include "mongo/platform/atomic_word.h"
#include "mongo/stdx/condition_variable.h"
-#include "mongo/stdx/list.h"
#include "mongo/stdx/mutex.h"
#include "mongo/stdx/variant.h"
#include "mongo/transport/service_entry_point.h"
@@ -75,7 +75,7 @@ public:
}
private:
- using SSMList = stdx::list<std::shared_ptr<ServiceStateMachine>>;
+ using SSMList = std::list<std::shared_ptr<ServiceStateMachine>>;
using SSMListIterator = SSMList::iterator;
ServiceContext* const _svcCtx;
diff --git a/src/mongo/transport/service_executor_adaptive.h b/src/mongo/transport/service_executor_adaptive.h
index 7beaca91026..4c3b670549b 100644
--- a/src/mongo/transport/service_executor_adaptive.h
+++ b/src/mongo/transport/service_executor_adaptive.h
@@ -30,12 +30,12 @@
#pragma once
#include <array>
+#include <list>
#include <vector>
#include "mongo/db/service_context.h"
#include "mongo/platform/atomic_word.h"
#include "mongo/stdx/condition_variable.h"
-#include "mongo/stdx/list.h"
#include "mongo/stdx/thread.h"
#include "mongo/transport/service_executor.h"
#include "mongo/transport/service_executor_task_names.h"
@@ -191,7 +191,7 @@ private:
int recursionDepth = 0;
};
- using ThreadList = stdx::list<ThreadState>;
+ using ThreadList = std::list<ThreadState>;
void _startWorkerThread(ThreadCreationReason reason);
static StringData _threadStartedByToString(ThreadCreationReason reason);