Commit 87a2402c authored by James Sedgwick's avatar James Sedgwick Committed by Facebook Github Bot

move MemoryMapping, Shell, ThreadId, ThreadName, and VersionCheck to system/

Summary:
Everything that's going in system/ besides CpuId and Subprocess,
which are included in hphp

Reviewed By: mzlee

Differential Revision: D6102263

fbshipit-source-id: 564ef584c341a4ac79db14a9d58fe23ce51e78b3
parent 453d5ff6
......@@ -480,6 +480,13 @@ if (BUILD_TESTS)
DIRECTORY synchronization/test/
TEST call_once_test SOURCES CallOnceTest.cpp
DIRECTORY system/test/
TEST memory_mapping_test SOURCES MemoryMappingTest.cpp
TEST shell_test SOURCES ShellTest.cpp
#TEST subprocess_test SOURCES SubprocessTest.cpp
TEST thread_id_test SOURCES ThreadIdTest.cpp
TEST thread_name_test SOURCES ThreadNameTest.cpp
DIRECTORY test/
TEST ahm_int_stress_test SOURCES AHMIntStressTest.cpp
TEST arena_test SOURCES ArenaTest.cpp
......@@ -552,7 +559,6 @@ if (BUILD_TESTS)
TEST map_util_test SOURCES MapUtilTest.cpp
TEST memcpy_test SOURCES MemcpyTest.cpp
TEST memory_idler_test SOURCES MemoryIdlerTest.cpp
TEST memory_mapping_test SOURCES MemoryMappingTest.cpp
TEST memory_test SOURCES MemoryTest.cpp
TEST merge SOURCES MergeTest.cpp
TEST move_wrapper_test SOURCES MoveWrapperTest.cpp
......@@ -579,7 +585,6 @@ if (BUILD_TESTS)
TEST scope_guard_test SOURCES ScopeGuardTest.cpp
# Heavily dependent on drand and srand48
#TEST shared_mutex_test SOURCES SharedMutexTest.cpp
TEST shell_test SOURCES ShellTest.cpp
TEST singleton_test SOURCES SingletonTest.cpp
TEST singleton_test_global SOURCES SingletonTestGlobal.cpp
TEST singleton_thread_local_test SOURCES SingletonThreadLocalTest.cpp
......@@ -588,13 +593,10 @@ if (BUILD_TESTS)
TEST sorted_vector_types_test SOURCES sorted_vector_test.cpp
TEST sparse_byte_set_test SOURCES SparseByteSetTest.cpp
TEST string_test SOURCES StringTest.cpp
#TEST subprocess_test SOURCES SubprocessTest.cpp
TEST synchronized_test SOURCES SynchronizedTest.cpp
TEST thread_cached_arena_test SOURCES ThreadCachedArenaTest.cpp
TEST thread_cached_int_test SOURCES ThreadCachedIntTest.cpp
TEST thread_id_test SOURCES ThreadIdTest.cpp
TEST thread_local_test SOURCES ThreadLocalTest.cpp
TEST thread_name_test SOURCES ThreadNameTest.cpp
TEST timeout_queue_test SOURCES TimeoutQueueTest.cpp
TEST token_bucket_test SOURCES TokenBucketTest.cpp
TEST traits_test SOURCES TraitsTest.cpp
......
......@@ -327,7 +327,6 @@ nobase_follyinclude_HEADERS = \
MapUtil.h \
Math.h \
Memory.h \
MemoryMapping.h \
memory/MallctlHelper.h \
memory/UninitializedMemoryHacks.h \
MicroSpinLock.h \
......@@ -390,7 +389,6 @@ nobase_follyinclude_HEADERS = \
SafeAssert.h \
ScopeGuard.h \
SharedMutex.h \
Shell.h \
Singleton.h \
Singleton-inl.h \
SingletonThreadLocal.h \
......@@ -419,6 +417,11 @@ nobase_follyinclude_HEADERS = \
stats/TimeseriesHistogram-defs.h \
stats/TimeseriesHistogram.h \
synchronization/CallOnce.h \
system/MemoryMapping.h \
system/Shell.h \
system/ThreadId.h \
system/ThreadName.h \
system/VersionCheck.h \
stop_watch.h \
String.h \
String-inl.h \
......@@ -434,9 +437,7 @@ nobase_follyinclude_HEADERS = \
test/TestUtils.h \
ThreadCachedArena.h \
ThreadCachedInt.h \
ThreadId.h \
ThreadLocal.h \
ThreadName.h \
TimeoutQueue.h \
TokenBucket.h \
tracing/StaticTracepoint.h \
......@@ -452,8 +453,7 @@ nobase_follyinclude_HEADERS = \
Uri.h \
Uri-inl.h \
Utility.h \
Varint.h \
VersionCheck.h
Varint.h
FormatTables.cpp: build/generate_format_tables.py
$(PYTHON) build/generate_format_tables.py
......@@ -563,7 +563,6 @@ libfolly_la_SOURCES = \
detail/MemoryIdler.cpp \
detail/SocketFastOpen.cpp \
MacAddress.cpp \
MemoryMapping.cpp \
portability/Dirent.cpp \
portability/Fcntl.cpp \
portability/Libgen.cpp \
......@@ -588,7 +587,6 @@ libfolly_la_SOURCES = \
SafeAssert.cpp \
ScopeGuard.cpp \
SharedMutex.cpp \
Shell.cpp \
MicroLock.cpp \
Optional.cpp \
Singleton.cpp \
......@@ -602,13 +600,15 @@ libfolly_la_SOURCES = \
stats/Histogram.cpp \
stats/MultiLevelTimeSeries.cpp \
stats/TimeseriesHistogram.cpp \
system/MemoryMapping.cpp \
system/Shell.cpp \
system/ThreadName.cpp \
system/VersionCheck.cpp \
Subprocess.cpp \
ThreadCachedArena.cpp \
ThreadName.cpp \
TimeoutQueue.cpp \
Try.cpp \
Uri.cpp \
Version.cpp \
experimental/AsymmetricMemoryBarrier.cpp \
experimental/ThreadedRepeatingFunctionRunner.cpp \
experimental/bser/Dump.cpp \
......
......@@ -38,13 +38,13 @@
#include <folly/Conv.h>
#include <folly/Exception.h>
#include <folly/ScopeGuard.h>
#include <folly/Shell.h>
#include <folly/String.h>
#include <folly/io/Cursor.h>
#include <folly/portability/Sockets.h>
#include <folly/portability/Stdlib.h>
#include <folly/portability/SysSyscall.h>
#include <folly/portability/Unistd.h>
#include <folly/system/Shell.h>
constexpr int kExecFailure = 127;
constexpr int kChildFailure = 126;
......
......@@ -33,9 +33,9 @@
#include <folly/Likely.h>
#include <folly/Memory.h>
#include <folly/Portability.h>
#include <folly/ThreadId.h>
#include <folly/portability/BitsFunctexcept.h>
#include <folly/portability/Memory.h>
#include <folly/system/ThreadId.h>
namespace folly {
......
......@@ -21,9 +21,9 @@
#include <folly/AtomicStruct.h>
#include <folly/Hash.h>
#include <folly/ThreadId.h>
#include <folly/Traits.h>
#include <folly/detail/Futex.h>
#include <folly/system/ThreadId.h>
namespace folly {
......
......@@ -20,8 +20,8 @@
#include <glog/logging.h>
#include <folly/ThreadName.h>
#include <folly/executors/thread_factory/NamedThreadFactory.h>
#include <folly/system/ThreadName.h>
namespace folly {
......
......@@ -22,8 +22,8 @@
#include <folly/Conv.h>
#include <folly/Range.h>
#include <folly/ThreadName.h>
#include <folly/executors/thread_factory/ThreadFactory.h>
#include <folly/system/ThreadName.h>
namespace folly {
......
......@@ -21,7 +21,7 @@
#include <folly/Conv.h>
#include <folly/Random.h>
#include <folly/String.h>
#include <folly/ThreadName.h>
#include <folly/system/ThreadName.h>
using std::chrono::milliseconds;
using std::chrono::steady_clock;
......
......@@ -15,7 +15,7 @@
*/
#include "folly/experimental/ThreadedRepeatingFunctionRunner.h"
#include <folly/ThreadName.h>
#include <folly/system/ThreadName.h>
#include <glog/logging.h>
#include <iostream>
......
......@@ -18,10 +18,10 @@
#include <stdexcept>
#include <folly/Format.h>
#include <folly/MemoryMapping.h>
#include <folly/Range.h>
#include <folly/experimental/io/HugePages.h>
#include <folly/portability/GFlags.h>
#include <folly/system/MemoryMapping.h>
DEFINE_bool(cp, false, "Copy file");
......
......@@ -15,7 +15,7 @@
*/
#include <folly/experimental/logging/LogMessage.h>
#include <folly/ThreadId.h>
#include <folly/system/ThreadId.h>
using std::chrono::system_clock;
......
......@@ -20,8 +20,8 @@
#include <folly/MPMCQueue.h>
#include <folly/Range.h>
#include <folly/Singleton.h>
#include <folly/ThreadName.h>
#include <folly/portability/GFlags.h>
#include <folly/system/ThreadName.h>
namespace folly {
namespace observer_detail {
......
......@@ -31,9 +31,9 @@
#include <mutex>
#include <folly/File.h>
#include <folly/MemoryMapping.h>
#include <folly/Range.h>
#include <folly/io/IOBuf.h>
#include <folly/system/MemoryMapping.h>
namespace folly {
......
......@@ -27,10 +27,10 @@
#include <folly/Baton.h>
#include <folly/Memory.h>
#include <folly/ThreadName.h>
#include <folly/io/async/NotificationQueue.h>
#include <folly/io/async/VirtualEventBase.h>
#include <folly/portability/Unistd.h>
#include <folly/system/ThreadName.h>
namespace folly {
......
......@@ -21,8 +21,8 @@
#include <folly/Random.h>
#include <folly/SharedMutex.h>
#include <folly/SpinLock.h>
#include <folly/ThreadId.h>
#include <folly/ssl/Init.h>
#include <folly/system/ThreadId.h>
// ---------------------------------------------------------------------
// SSLContext implementation
......
......@@ -20,8 +20,8 @@
#include <folly/Function.h>
#include <folly/Range.h>
#include <folly/ThreadName.h>
#include <folly/io/async/EventBaseManager.h>
#include <folly/system/ThreadName.h>
using namespace std;
......
......@@ -19,9 +19,9 @@
#include <chrono>
#include <folly/Baton.h>
#include <folly/ThreadName.h>
#include <folly/io/async/EventBaseManager.h>
#include <folly/portability/GTest.h>
#include <folly/system/ThreadName.h>
using namespace std;
using namespace std::chrono;
......
......@@ -21,9 +21,9 @@
#include <folly/Baton.h>
#include <folly/Optional.h>
#include <folly/ThreadName.h>
#include <folly/io/async/EventBaseManager.h>
#include <folly/portability/GTest.h>
#include <folly/system/ThreadName.h>
using namespace std;
using namespace std::chrono;
......
......@@ -33,8 +33,8 @@
#include <folly/Conv.h>
#include <folly/ScopeGuard.h>
#include <folly/ThreadId.h>
#include <folly/portability/Unistd.h>
#include <folly/system/ThreadId.h>
#include <glog/logging.h>
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include <folly/MemoryMapping.h>
#include <folly/system/MemoryMapping.h>
#include <algorithm>
#include <functional>
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include <folly/Shell.h>
#include <folly/system/Shell.h>
namespace folly {
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include <folly/ThreadName.h>
#include <folly/system/ThreadName.h>
#include <type_traits>
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include <folly/VersionCheck.h>
#include <folly/system/VersionCheck.h>
namespace folly { namespace detail {
......
......@@ -17,10 +17,10 @@
#include <cstdlib>
#include <folly/FileUtil.h>
#include <folly/MemoryMapping.h>
#include <folly/Random.h>
#include <folly/portability/GTest.h>
#include <folly/portability/SysMman.h>
#include <folly/system/MemoryMapping.h>
static constexpr double kSomeDouble = 3.14;
......
......@@ -16,8 +16,8 @@
#include <glog/logging.h>
#include <folly/Shell.h>
#include <folly/portability/GTest.h>
#include <folly/system/Shell.h>
using namespace folly;
......
......@@ -17,7 +17,7 @@
// Make sure we include ThreadId.h before anything else.
// There is no ThreadId.cpp file, so this test is the only thing that verifies
// that ThreadId.h compiles by itself when included first.
#include <folly/ThreadId.h>
#include <folly/system/ThreadId.h>
#include <thread>
......
......@@ -18,8 +18,8 @@
#include <folly/Baton.h>
#include <folly/ScopeGuard.h>
#include <folly/ThreadName.h>
#include <folly/portability/GTest.h>
#include <folly/system/ThreadName.h>
using namespace std;
using namespace folly;
......
......@@ -102,7 +102,7 @@ TESTS += fbstring_test_using_jemalloc
thread_cached_int_test_SOURCES = ThreadCachedIntTest.cpp
thread_cached_int_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
thread_id_test_SOURCES = ThreadIdTest.cpp
thread_id_test_SOURCES = system/test/ThreadIdTest.cpp
thread_id_test_LDADD = libfollytestmain.la
TESTS += thread_id_test
......@@ -239,7 +239,7 @@ token_bucket_test_SOURCES = TokenBucketTest.cpp
token_bucket_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += token_bucket_test
thread_name_test_SOURCES = ThreadNameTest.cpp
thread_name_test_SOURCES = system/ThreadNameTest.cpp
thread_name_test_LDADD = libfollytestmain.la
TESTS += thread_name_test
......
......@@ -24,9 +24,9 @@
#include <folly/Benchmark.h>
#include <folly/Hash.h>
#include <folly/ThreadId.h>
#include <folly/portability/GFlags.h>
#include <folly/portability/GTest.h>
#include <folly/system/ThreadId.h>
using namespace folly;
......
......@@ -38,10 +38,10 @@
#include <folly/Baton.h>
#include <folly/Memory.h>
#include <folly/ThreadId.h>
#include <folly/experimental/io/FsUtil.h>
#include <folly/portability/GTest.h>
#include <folly/portability/Unistd.h>
#include <folly/system/ThreadId.h>
using namespace folly;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment