Add Tearable, for concurrently-modified non-atomic objects.
[folly.git] / folly / Makefile.am
index 7d28d8c0548f94bb224734a7e278184fef3d19c3..3ba08f4c5df7f4c6996bf3fe31963cc0c9ac0cbe 100644 (file)
@@ -5,7 +5,7 @@ endif
 # Note that the order of SUBDIRS matters.
 # Many subdirectories depend on libfollytest from the test directory,
 # so it must appear before other directories
-SUBDIRS = . test experimental $(MAYBE_INIT) io/test stats/test
+SUBDIRS = . test experimental $(MAYBE_INIT) chrono/test io/test stats/test
 
 ACLOCAL_AMFLAGS = -I m4
 
@@ -27,8 +27,6 @@ lib_LTLIBRARIES = \
 follyincludedir = $(includedir)/folly
 
 nobase_follyinclude_HEADERS = \
-       Array.h \
-       Assume.h \
        AtomicBitSet.h \
        AtomicHashArray.h \
        AtomicHashArray-inl.h \
@@ -36,17 +34,15 @@ nobase_follyinclude_HEADERS = \
        AtomicHashMap-inl.h \
        AtomicIntrusiveLinkedList.h \
        AtomicLinkedList.h \
-       AtomicStruct.h \
        AtomicUnorderedMap.h \
-       Baton.h \
        Benchmark.h \
        Bits.h \
        CachelinePadded.h \
        Chrono.h \
+       chrono/Conv.h \
        ClockGettimeWrappers.h \
        ConcurrentSkipList.h \
        ConcurrentSkipList-inl.h \
-       ContainerTraits.h \
        Conv.h \
        CppAttributes.h \
        CpuId.h \
@@ -58,6 +54,10 @@ nobase_follyinclude_HEADERS = \
        concurrency/ConcurrentHashMap.h \
        concurrency/CoreCachedSharedPtr.h \
        concurrency/detail/ConcurrentHashMap-detail.h \
+       concurrency/UnboundedQueue.h \
+       container/Access.h \
+       container/Array.h \
+       container/detail/BitIteratorDetail.h \
        container/Iterator.h \
        container/Enumerate.h \
        container/EvictingCacheMap.h \
@@ -65,10 +65,9 @@ nobase_follyinclude_HEADERS = \
        container/Foreach-inl.h \
        container/SparseByteSet.h \
        ConstexprMath.h \
+       detail/AtFork.h \
        detail/AtomicHashUtils.h \
        detail/AtomicUnorderedMapUtils.h \
-       detail/AtomicUtils.h \
-       detail/BitIteratorDetail.h \
        detail/DiscriminatedPtrDetail.h \
        detail/FileUtilDetail.h \
        detail/FingerprintPolynomial.h \
@@ -78,15 +77,15 @@ nobase_follyinclude_HEADERS = \
        detail/IPAddressSource.h \
        detail/MemoryIdler.h \
        detail/MPMCPipelineDetail.h \
+       detail/PolyDetail.h \
        detail/RangeCommon.h \
        detail/RangeSse42.h \
-       detail/Sleeper.h \
        detail/SlowFingerprint.h \
        detail/SocketFastOpen.h \
        detail/StaticSingletonManager.h \
        detail/ThreadLocalDetail.h \
+       detail/TypeList.h \
        detail/TurnSequencer.h \
-       detail/UncaughtExceptionCounter.h \
        executors/Async.h \
        executors/CPUThreadPoolExecutor.h \
        executors/Codel.h \
@@ -125,7 +124,6 @@ nobase_follyinclude_HEADERS = \
        Expected.h \
        concurrency/AtomicSharedPtr.h \
        concurrency/detail/AtomicSharedPtr-detail.h \
-       experimental/AsymmetricMemoryBarrier.h \
        experimental/AutoTimer.h \
        experimental/ThreadedRepeatingFunctionRunner.h \
        experimental/Bits.h \
@@ -155,14 +153,21 @@ nobase_follyinclude_HEADERS = \
        experimental/JSONSchema.h \
        experimental/LockFreeRingBuffer.h \
        experimental/logging/AsyncFileWriter.h \
+       experimental/logging/FileHandlerFactory.h \
+       experimental/logging/FileWriterFactory.h \
        experimental/logging/GlogStyleFormatter.h \
        experimental/logging/ImmediateFileWriter.h \
        experimental/logging/Init.h \
        experimental/logging/LogCategory.h \
+       experimental/logging/LogCategoryConfig.h \
+       experimental/logging/LogConfig.h \
+       experimental/logging/LogConfigParser.h \
        experimental/logging/LogFormatter.h \
        experimental/logging/Logger.h \
        experimental/logging/LoggerDB.h \
        experimental/logging/LogHandler.h \
+       experimental/logging/LogHandlerFactory.h \
+       experimental/logging/LogHandlerConfig.h \
        experimental/logging/LogLevel.h \
        experimental/logging/LogMessage.h \
        experimental/logging/LogName.h \
@@ -172,6 +177,8 @@ nobase_follyinclude_HEADERS = \
        experimental/logging/printf.h \
        experimental/logging/RateLimiter.h \
        experimental/logging/StandardLogHandler.h \
+       experimental/logging/StandardLogHandlerFactory.h \
+       experimental/logging/StreamHandlerFactory.h \
        experimental/logging/xlog.h \
        experimental/NestedCommandLineApp.h \
        experimental/observer/detail/Core.h \
@@ -228,6 +235,7 @@ nobase_follyinclude_HEADERS = \
        futures/test/TestExecutor.h \
        hash/Checksum.h \
        hash/detail/ChecksumDetail.h \
+       hash/Hash.h \
        hash/SpookyHashV1.h \
        hash/SpookyHashV2.h \
        gen/Base.h \
@@ -312,9 +320,14 @@ nobase_follyinclude_HEADERS = \
        io/async/test/UndelayedDestruction.h \
        io/async/test/Util.h \
        json.h \
-       Launder.h \
+       lang/Align.h \
+       lang/Assume.h \
+       lang/Bits.h \
+       lang/ColdClass.h \
+       lang/Launder.h \
+       lang/RValueReferenceWrapper.h \
+       lang/SafeAssert.h \
        Lazy.h \
-       LifoSem.h \
        Likely.h \
        LockTraits.h \
        LockTraitsBoost.h \
@@ -340,6 +353,10 @@ nobase_follyinclude_HEADERS = \
        PackedSyncPtr.h \
        Padded.h \
        PicoSpinLock.h \
+       Poly.h \
+       Poly-inl.h \
+       poly/Nullable.h \
+       poly/Regular.h \
        Portability.h \
        portability/Asm.h \
        portability/Atomic.h \
@@ -386,8 +403,6 @@ nobase_follyinclude_HEADERS = \
        Random-inl.h \
        Range.h \
        Replaceable.h \
-       RWSpinLock.h \
-       SafeAssert.h \
        ScopeGuard.h \
        SharedMutex.h \
        Singleton.h \
@@ -416,7 +431,18 @@ nobase_follyinclude_HEADERS = \
        stats/MultiLevelTimeSeries.h \
        stats/TimeseriesHistogram-defs.h \
        stats/TimeseriesHistogram.h \
+       synchronization/AsymmetricMemoryBarrier.h \
+       synchronization/AtomicStruct.h \
+       synchronization/Baton.h \
        synchronization/CallOnce.h \
+       synchronization/LifoSem.h \
+       synchronization/ParkingLot.h \
+       synchronization/RWSpinLock.h \
+       synchronization/SaturatingSemaphore.h \
+       synchronization/Tearable.h \
+       synchronization/WaitOptions.h \
+       synchronization/detail/AtomicUtils.h \
+       synchronization/detail/Sleeper.h \
        system/MemoryMapping.h \
        system/Shell.h \
        system/ThreadId.h \
@@ -446,7 +472,6 @@ nobase_follyinclude_HEADERS = \
        Try.h \
        Unicode.h \
        Function.h \
-       Functional.h \
        UncaughtExceptions.h \
        Unit.h \
        Uri.h \
@@ -485,11 +510,11 @@ libfollybase_la_SOURCES = \
        Unicode.cpp
 
 libfolly_la_SOURCES = \
-       Assume.cpp \
        ClockGettimeWrappers.cpp \
        compression/Compression.cpp \
        compression/Zlib.cpp \
        concurrency/CacheLocality.cpp \
+       detail/AtFork.cpp \
        detail/Futex.cpp \
        detail/IPAddress.cpp \
        detail/StaticSingletonManager.cpp \
@@ -497,6 +522,7 @@ libfolly_la_SOURCES = \
        dynamic.cpp \
        ExceptionWrapper.cpp \
        Executor.cpp \
+       Expected.cpp \
        File.cpp \
        FileUtil.cpp \
        FingerprintTables.cpp \
@@ -526,7 +552,6 @@ libfolly_la_SOURCES = \
        IPAddress.cpp \
        IPAddressV4.cpp \
        IPAddressV6.cpp \
-       LifoSem.cpp \
        init/Init.cpp \
        io/Cursor.cpp \
        io/IOBuf.cpp \
@@ -559,6 +584,9 @@ libfolly_la_SOURCES = \
        io/async/ssl/OpenSSLUtils.cpp \
        io/async/ssl/SSLErrors.cpp \
        json.cpp \
+       lang/Assume.cpp \
+       lang/ColdClass.cpp \
+       lang/SafeAssert.cpp \
        detail/MemoryIdler.cpp \
        detail/SocketFastOpen.cpp \
        MacAddress.cpp \
@@ -567,7 +595,6 @@ libfolly_la_SOURCES = \
        portability/Fcntl.cpp \
        portability/Libgen.cpp \
        portability/Malloc.cpp \
-       portability/Memory.cpp \
        portability/OpenSSL.cpp \
        portability/PThread.cpp \
        portability/Sockets.cpp \
@@ -584,7 +611,6 @@ libfolly_la_SOURCES = \
        portability/Time.cpp \
        portability/Unistd.cpp \
        Random.cpp \
-       SafeAssert.cpp \
        ScopeGuard.cpp \
        SharedMutex.cpp \
        MicroLock.cpp \
@@ -600,6 +626,9 @@ libfolly_la_SOURCES = \
        stats/Histogram.cpp \
        stats/MultiLevelTimeSeries.cpp \
        stats/TimeseriesHistogram.cpp \
+       synchronization/AsymmetricMemoryBarrier.cpp \
+       synchronization/LifoSem.cpp \
+       synchronization/ParkingLot.cpp \
        system/MemoryMapping.cpp \
        system/Shell.cpp \
        system/ThreadName.cpp \
@@ -608,7 +637,6 @@ libfolly_la_SOURCES = \
        TimeoutQueue.cpp \
        Try.cpp \
        Uri.cpp \
-       experimental/AsymmetricMemoryBarrier.cpp \
        experimental/ThreadedRepeatingFunctionRunner.cpp \
        experimental/bser/Dump.cpp \
        experimental/bser/Load.cpp \
@@ -704,6 +732,11 @@ libfolly_la_SOURCES += \
        experimental/symbolizer/Symbolizer.cpp
 endif
 
+if HAVE_VARIABLE_TEMPLATES
+libfolly_la_SOURCES += \
+       Poly.cpp
+endif
+
 libfollybasesse42_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
 libfollybasesse42_la_CXXFLAGS = -msse4.2 -mpclmul
 
@@ -713,6 +746,10 @@ libfollybase_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
 libfolly_la_LIBADD = libfollybase.la
 libfolly_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION) -lssl
 
+if USE_SYMBOLIZER
+libfolly_la_LDFLAGS += -lunwind
+endif
+
 FingerprintTables.cpp: generate_fingerprint_tables
        ./generate_fingerprint_tables
 CLEANFILES += FingerprintTables.cpp