Commit 5be3abd7 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Move folly/RWSpinLock.h to folly/synchronization/

Summary: [Folly] Move `folly/RWSpinLock.h` to `folly/synchronization/`.

Reviewed By: elsteveogrande

Differential Revision: D6659265

fbshipit-source-id: 307723e22f42ceb104f26657aed8b34f7e183afb
parent 183fc6b4
...@@ -545,6 +545,7 @@ if (BUILD_TESTS) ...@@ -545,6 +545,7 @@ if (BUILD_TESTS)
TEST baton_test SOURCES BatonTest.cpp TEST baton_test SOURCES BatonTest.cpp
TEST call_once_test SOURCES CallOnceTest.cpp TEST call_once_test SOURCES CallOnceTest.cpp
TEST lifo_sem_test SOURCES LifoSemTests.cpp TEST lifo_sem_test SOURCES LifoSemTests.cpp
TEST rw_spin_lock_test SOURCES RWSpinLockTest.cpp
DIRECTORY system/test/ DIRECTORY system/test/
TEST memory_mapping_test SOURCES MemoryMappingTest.cpp TEST memory_mapping_test SOURCES MemoryMappingTest.cpp
...@@ -631,7 +632,6 @@ if (BUILD_TESTS) ...@@ -631,7 +632,6 @@ if (BUILD_TESTS)
TEST portability_test SOURCES PortabilityTest.cpp TEST portability_test SOURCES PortabilityTest.cpp
TEST producer_consumer_queue_test SLOW TEST producer_consumer_queue_test SLOW
SOURCES ProducerConsumerQueueTest.cpp SOURCES ProducerConsumerQueueTest.cpp
TEST r_w_spin_lock_test SOURCES RWSpinLockTest.cpp
TEST random_test SOURCES RandomTest.cpp TEST random_test SOURCES RandomTest.cpp
TEST range_test SOURCES RangeTest.cpp TEST range_test SOURCES RangeTest.cpp
TEST safe_assert_test SOURCES SafeAssertTest.cpp TEST safe_assert_test SOURCES SafeAssertTest.cpp
......
...@@ -403,7 +403,6 @@ nobase_follyinclude_HEADERS = \ ...@@ -403,7 +403,6 @@ nobase_follyinclude_HEADERS = \
Random-inl.h \ Random-inl.h \
Range.h \ Range.h \
Replaceable.h \ Replaceable.h \
RWSpinLock.h \
ScopeGuard.h \ ScopeGuard.h \
SharedMutex.h \ SharedMutex.h \
Singleton.h \ Singleton.h \
...@@ -438,6 +437,7 @@ nobase_follyinclude_HEADERS = \ ...@@ -438,6 +437,7 @@ nobase_follyinclude_HEADERS = \
synchronization/CallOnce.h \ synchronization/CallOnce.h \
synchronization/LifoSem.h \ synchronization/LifoSem.h \
synchronization/ParkingLot.h \ synchronization/ParkingLot.h \
synchronization/RWSpinLock.h \
synchronization/SaturatingSemaphore.h \ synchronization/SaturatingSemaphore.h \
synchronization/detail/AtomicUtils.h \ synchronization/detail/AtomicUtils.h \
synchronization/detail/Sleeper.h \ synchronization/detail/Sleeper.h \
......
This diff is collapsed.
/* /*
* Copyright 2017 Facebook, Inc. * Copyright 2017-present Facebook, Inc.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
// SingletonVault - a library to manage the creation and destruction // SingletonVault - a library to manage the creation and destruction
// of interdependent singletons. // of interdependent singletons.
// //
...@@ -125,12 +124,12 @@ ...@@ -125,12 +124,12 @@
#include <folly/Exception.h> #include <folly/Exception.h>
#include <folly/Executor.h> #include <folly/Executor.h>
#include <folly/Memory.h> #include <folly/Memory.h>
#include <folly/RWSpinLock.h>
#include <folly/Synchronized.h> #include <folly/Synchronized.h>
#include <folly/detail/StaticSingletonManager.h> #include <folly/detail/StaticSingletonManager.h>
#include <folly/experimental/ReadMostlySharedPtr.h> #include <folly/experimental/ReadMostlySharedPtr.h>
#include <folly/hash/Hash.h> #include <folly/hash/Hash.h>
#include <folly/synchronization/Baton.h> #include <folly/synchronization/Baton.h>
#include <folly/synchronization/RWSpinLock.h>
#include <algorithm> #include <algorithm>
#include <atomic> #include <atomic>
......
/* /*
* Copyright 2017 Facebook, Inc. * Copyright 2017-present Facebook, Inc.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,16 +13,15 @@ ...@@ -13,16 +13,15 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
#pragma once #pragma once
#include <folly/Executor.h> #include <folly/Executor.h>
#include <folly/Memory.h> #include <folly/Memory.h>
#include <folly/RWSpinLock.h>
#include <folly/executors/GlobalThreadPoolList.h> #include <folly/executors/GlobalThreadPoolList.h>
#include <folly/executors/task_queue/LifoSemMPMCQueue.h> #include <folly/executors/task_queue/LifoSemMPMCQueue.h>
#include <folly/executors/thread_factory/NamedThreadFactory.h> #include <folly/executors/thread_factory/NamedThreadFactory.h>
#include <folly/io/async/Request.h> #include <folly/io/async/Request.h>
#include <folly/synchronization/Baton.h> #include <folly/synchronization/Baton.h>
#include <folly/synchronization/RWSpinLock.h>
#include <algorithm> #include <algorithm>
#include <mutex> #include <mutex>
......
/* /*
* Copyright 2017 Facebook, Inc. * Copyright 2017-present Facebook, Inc.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,17 +13,16 @@ ...@@ -13,17 +13,16 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
#include <folly/experimental/exception_tracer/ExceptionCounterLib.h> #include <folly/experimental/exception_tracer/ExceptionCounterLib.h>
#include <iosfwd> #include <iosfwd>
#include <unordered_map> #include <unordered_map>
#include <folly/RWSpinLock.h>
#include <folly/Range.h> #include <folly/Range.h>
#include <folly/Synchronized.h> #include <folly/Synchronized.h>
#include <folly/ThreadLocal.h> #include <folly/ThreadLocal.h>
#include <folly/hash/SpookyHashV2.h> #include <folly/hash/SpookyHashV2.h>
#include <folly/synchronization/RWSpinLock.h>
#include <folly/experimental/exception_tracer/ExceptionTracerLib.h> #include <folly/experimental/exception_tracer/ExceptionTracerLib.h>
#include <folly/experimental/exception_tracer/StackTrace.h> #include <folly/experimental/exception_tracer/StackTrace.h>
......
/* /*
* Copyright 2017 Facebook, Inc. * Copyright 2017-present Facebook, Inc.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <functional> #include <functional>
#include <string> #include <string>
#include <folly/RWSpinLock.h> #include <folly/synchronization/RWSpinLock.h>
#include <folly/io/async/AsyncServerSocket.h> #include <folly/io/async/AsyncServerSocket.h>
......
This diff is collapsed.
/* /*
* Copyright 2017 Facebook, Inc. * Copyright 2017-present Facebook, Inc.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,12 +13,11 @@ ...@@ -13,12 +13,11 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
// //
// @author xliu (xliux@fb.com) // @author xliu (xliux@fb.com)
// //
#include <folly/RWSpinLock.h> #include <folly/synchronization/RWSpinLock.h>
#include <stdlib.h> #include <stdlib.h>
#include <thread> #include <thread>
......
/* /*
* Copyright 2017 Facebook, Inc. * Copyright 2017-present Facebook, Inc.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
// @author: Xin Liu <xliux@fb.com> // @author: Xin Liu <xliux@fb.com>
#include <map> #include <map>
...@@ -24,9 +23,9 @@ ...@@ -24,9 +23,9 @@
#include <folly/Benchmark.h> #include <folly/Benchmark.h>
#include <folly/ConcurrentSkipList.h> #include <folly/ConcurrentSkipList.h>
#include <folly/RWSpinLock.h>
#include <folly/hash/Hash.h> #include <folly/hash/Hash.h>
#include <folly/portability/GFlags.h> #include <folly/portability/GFlags.h>
#include <folly/synchronization/RWSpinLock.h>
#include <glog/logging.h> #include <glog/logging.h>
DEFINE_int32(num_threads, 12, "num concurrent threads to test"); DEFINE_int32(num_threads, 12, "num concurrent threads to test");
......
/* /*
* Copyright 2017 Facebook, Inc. * Copyright 2017-present Facebook, Inc.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
#include <mutex> #include <mutex>
#include <folly/RWSpinLock.h>
#include <folly/SharedMutex.h> #include <folly/SharedMutex.h>
#include <folly/SpinLock.h> #include <folly/SpinLock.h>
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
#include <folly/synchronization/RWSpinLock.h>
using namespace folly; using namespace folly;
......
...@@ -178,7 +178,7 @@ endian_test_SOURCES = EndianTest.cpp ...@@ -178,7 +178,7 @@ endian_test_SOURCES = EndianTest.cpp
endian_test_LDADD = libfollytestmain.la endian_test_LDADD = libfollytestmain.la
TESTS += endian_test TESTS += endian_test
rw_spinlock_test_SOURCES = RWSpinLockTest.cpp rw_spinlock_test_SOURCES = ../synchronization/test/RWSpinLockTest.cpp
rw_spinlock_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la rw_spinlock_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += rw_spinlock_test TESTS += rw_spinlock_test
......
/* /*
* Copyright 2017 Facebook, Inc. * Copyright 2017-present Facebook, Inc.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
#include <folly/SharedMutex.h> #include <folly/SharedMutex.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -25,9 +24,9 @@ ...@@ -25,9 +24,9 @@
#include <folly/Benchmark.h> #include <folly/Benchmark.h>
#include <folly/MPMCQueue.h> #include <folly/MPMCQueue.h>
#include <folly/RWSpinLock.h>
#include <folly/portability/GFlags.h> #include <folly/portability/GFlags.h>
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
#include <folly/synchronization/RWSpinLock.h>
#include <folly/test/DeterministicSchedule.h> #include <folly/test/DeterministicSchedule.h>
using namespace folly; using namespace folly;
......
...@@ -13,13 +13,12 @@ ...@@ -13,13 +13,12 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
#include <folly/SynchronizedPtr.h> #include <folly/SynchronizedPtr.h>
#include <folly/Optional.h> #include <folly/Optional.h>
#include <folly/RWSpinLock.h>
#include <folly/Replaceable.h> #include <folly/Replaceable.h>
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
#include <folly/synchronization/RWSpinLock.h>
template <typename SPtr> template <typename SPtr>
void basics(SPtr& sptr) { void basics(SPtr& sptr) {
......
...@@ -13,18 +13,17 @@ ...@@ -13,18 +13,17 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
// @author: Andrei Alexandrescu (aalexandre) // @author: Andrei Alexandrescu (aalexandre)
// Test bed for folly/Synchronized.h // Test bed for folly/Synchronized.h
#include <folly/Synchronized.h>
#include <folly/LockTraitsBoost.h> #include <folly/LockTraitsBoost.h>
#include <folly/Portability.h> #include <folly/Portability.h>
#include <folly/RWSpinLock.h>
#include <folly/SharedMutex.h> #include <folly/SharedMutex.h>
#include <folly/SpinLock.h> #include <folly/SpinLock.h>
#include <folly/Synchronized.h>
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
#include <folly/synchronization/RWSpinLock.h>
#include <folly/test/SynchronizedTestLib.h> #include <folly/test/SynchronizedTestLib.h>
using namespace folly::sync_tests; using namespace folly::sync_tests;
......
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