From c593d8eda8eea90818908fce46409b970ca1f540 Mon Sep 17 00:00:00 2001 From: Yedidya Feldblum Date: Mon, 6 Nov 2017 15:22:31 -0800 Subject: [PATCH] Move folly/LifoSem.h Summary: [Folly] Move `folly/LifoSem.h` to `folly/synchronization/`. Reviewed By: meyering Differential Revision: D6245444 fbshipit-source-id: 14ffa012fa92b8c6aaf5900c930156894a492003 --- CMakeLists.txt | 2 +- folly/Makefile.am | 4 ++-- folly/executors/ManualExecutor.h | 2 +- folly/executors/task_queue/LifoSemMPMCQueue.h | 2 +- folly/executors/task_queue/PriorityLifoSemMPMCQueue.h | 2 +- folly/executors/task_queue/UnboundedBlockingQueue.h | 2 +- folly/{ => synchronization}/LifoSem.cpp | 2 +- folly/{ => synchronization}/LifoSem.h | 0 folly/{ => synchronization}/test/LifoSemTests.cpp | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) rename folly/{ => synchronization}/LifoSem.cpp (96%) rename folly/{ => synchronization}/LifoSem.h (100%) rename folly/{ => synchronization}/test/LifoSemTests.cpp (99%) diff --git a/CMakeLists.txt b/CMakeLists.txt index a3721612..37152974 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -505,6 +505,7 @@ if (BUILD_TESTS) DIRECTORY synchronization/test/ TEST call_once_test SOURCES CallOnceTest.cpp + TEST lifo_sem_test SOURCES LifoSemTests.cpp DIRECTORY system/test/ TEST memory_mapping_test SOURCES MemoryMappingTest.cpp @@ -569,7 +570,6 @@ if (BUILD_TESTS) SOURCES JsonOtherTest.cpp TEST lazy_test SOURCES LazyTest.cpp - TEST lifosem_test SOURCES LifoSemTests.cpp TEST lock_traits_test SOURCES LockTraitsTest.cpp TEST locks_test SOURCES SmallLocksTest.cpp SpinLockTest.cpp TEST logging_test SOURCES LoggingTest.cpp diff --git a/folly/Makefile.am b/folly/Makefile.am index 37f95d1c..422b7bb8 100644 --- a/folly/Makefile.am +++ b/folly/Makefile.am @@ -317,7 +317,6 @@ nobase_follyinclude_HEADERS = \ lang/RValueReferenceWrapper.h \ lang/SafeAssert.h \ Lazy.h \ - LifoSem.h \ Likely.h \ LockTraits.h \ LockTraitsBoost.h \ @@ -424,6 +423,7 @@ nobase_follyinclude_HEADERS = \ stats/TimeseriesHistogram.h \ synchronization/AsymmetricMemoryBarrier.h \ synchronization/CallOnce.h \ + synchronization/LifoSem.h \ synchronization/detail/AtomicUtils.h \ system/MemoryMapping.h \ system/Shell.h \ @@ -533,7 +533,6 @@ libfolly_la_SOURCES = \ IPAddress.cpp \ IPAddressV4.cpp \ IPAddressV6.cpp \ - LifoSem.cpp \ init/Init.cpp \ io/Cursor.cpp \ io/IOBuf.cpp \ @@ -609,6 +608,7 @@ libfolly_la_SOURCES = \ stats/MultiLevelTimeSeries.cpp \ stats/TimeseriesHistogram.cpp \ synchronization/AsymmetricMemoryBarrier.cpp \ + synchronization/LifoSem.cpp \ system/MemoryMapping.cpp \ system/Shell.cpp \ system/ThreadName.cpp \ diff --git a/folly/executors/ManualExecutor.h b/folly/executors/ManualExecutor.h index 9f060164..bad7d96e 100644 --- a/folly/executors/ManualExecutor.h +++ b/folly/executors/ManualExecutor.h @@ -21,9 +21,9 @@ #include #include -#include #include #include +#include namespace folly { /// A ManualExecutor only does work when you turn the crank, by calling diff --git a/folly/executors/task_queue/LifoSemMPMCQueue.h b/folly/executors/task_queue/LifoSemMPMCQueue.h index 68a86061..96ec8e98 100644 --- a/folly/executors/task_queue/LifoSemMPMCQueue.h +++ b/folly/executors/task_queue/LifoSemMPMCQueue.h @@ -16,9 +16,9 @@ #pragma once -#include #include #include +#include namespace folly { diff --git a/folly/executors/task_queue/PriorityLifoSemMPMCQueue.h b/folly/executors/task_queue/PriorityLifoSemMPMCQueue.h index 3242628d..ab9d12ef 100644 --- a/folly/executors/task_queue/PriorityLifoSemMPMCQueue.h +++ b/folly/executors/task_queue/PriorityLifoSemMPMCQueue.h @@ -17,9 +17,9 @@ #pragma once #include -#include #include #include +#include namespace folly { diff --git a/folly/executors/task_queue/UnboundedBlockingQueue.h b/folly/executors/task_queue/UnboundedBlockingQueue.h index 2f29fbfb..8fc83915 100644 --- a/folly/executors/task_queue/UnboundedBlockingQueue.h +++ b/folly/executors/task_queue/UnboundedBlockingQueue.h @@ -16,9 +16,9 @@ #pragma once -#include #include #include +#include #include namespace folly { diff --git a/folly/LifoSem.cpp b/folly/synchronization/LifoSem.cpp similarity index 96% rename from folly/LifoSem.cpp rename to folly/synchronization/LifoSem.cpp index d3fa5065..0cf5b481 100644 --- a/folly/LifoSem.cpp +++ b/folly/synchronization/LifoSem.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include +#include /// Raw node storage is preallocated in a contiguous memory segment, /// but we use an anonymous mmap so the physical memory used (RSS) will diff --git a/folly/LifoSem.h b/folly/synchronization/LifoSem.h similarity index 100% rename from folly/LifoSem.h rename to folly/synchronization/LifoSem.h diff --git a/folly/test/LifoSemTests.cpp b/folly/synchronization/test/LifoSemTests.cpp similarity index 99% rename from folly/test/LifoSemTests.cpp rename to folly/synchronization/test/LifoSemTests.cpp index c6c9b45f..fae889b6 100644 --- a/folly/test/LifoSemTests.cpp +++ b/folly/synchronization/test/LifoSemTests.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include +#include #include -- 2.34.1