Move folly/detail/AtomicUtils.h
authorYedidya Feldblum <yfeldblum@fb.com>
Sat, 28 Oct 2017 18:31:23 +0000 (11:31 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 28 Oct 2017 18:43:17 +0000 (11:43 -0700)
Summary: [Folly] Move `folly/detail/AtomicUtils.h` to `folly/synchronization/detail/`.

Reviewed By: Orvid

Differential Revision: D6180482

fbshipit-source-id: 5671c149a59eea824db2935ffabcf85a2f78b690

folly/AtomicStruct.h
folly/Makefile.am
folly/concurrency/AtomicSharedPtr.h
folly/detail/AtomicUtils.h [deleted file]
folly/synchronization/detail/AtomicUtils.h [new file with mode: 0644]
folly/test/DeterministicSchedule.h

index e329760..a774d31 100644 (file)
@@ -17,7 +17,7 @@
 #pragma once
 
 #include <folly/Traits.h>
-#include <folly/detail/AtomicUtils.h>
+#include <folly/synchronization/detail/AtomicUtils.h>
 #include <stdint.h>
 #include <string.h>
 #include <atomic>
index bb51537..f2b89b7 100644 (file)
@@ -67,7 +67,6 @@ nobase_follyinclude_HEADERS = \
        ConstexprMath.h \
        detail/AtomicHashUtils.h \
        detail/AtomicUnorderedMapUtils.h \
-       detail/AtomicUtils.h \
        detail/BitIteratorDetail.h \
        detail/DiscriminatedPtrDetail.h \
        detail/FileUtilDetail.h \
@@ -418,6 +417,7 @@ nobase_follyinclude_HEADERS = \
        stats/TimeseriesHistogram-defs.h \
        stats/TimeseriesHistogram.h \
        synchronization/CallOnce.h \
+       synchronization/detail/AtomicUtils.h \
        system/MemoryMapping.h \
        system/Shell.h \
        system/ThreadId.h \
index bd400d3..d1b2aa7 100644 (file)
@@ -18,7 +18,7 @@
 #include <folly/AtomicStruct.h>
 #include <folly/PackedSyncPtr.h>
 #include <folly/concurrency/detail/AtomicSharedPtr-detail.h>
-#include <folly/detail/AtomicUtils.h>
+#include <folly/synchronization/detail/AtomicUtils.h>
 #include <atomic>
 #include <thread>
 
diff --git a/folly/detail/AtomicUtils.h b/folly/detail/AtomicUtils.h
deleted file mode 100644 (file)
index ff6a85e..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2017 Facebook, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <atomic>
-
-namespace folly {
-namespace detail {
-
-inline std::memory_order default_failure_memory_order(
-    std::memory_order successMode) {
-  switch (successMode) {
-    case std::memory_order_acq_rel:
-      return std::memory_order_acquire;
-    case std::memory_order_release:
-      return std::memory_order_relaxed;
-    default:
-      return successMode;
-  }
-}
-} // namespace detail
-} // namespace folly
diff --git a/folly/synchronization/detail/AtomicUtils.h b/folly/synchronization/detail/AtomicUtils.h
new file mode 100644 (file)
index 0000000..ff6a85e
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2017 Facebook, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <atomic>
+
+namespace folly {
+namespace detail {
+
+inline std::memory_order default_failure_memory_order(
+    std::memory_order successMode) {
+  switch (successMode) {
+    case std::memory_order_acq_rel:
+      return std::memory_order_acquire;
+    case std::memory_order_release:
+      return std::memory_order_relaxed;
+    default:
+      return successMode;
+  }
+}
+} // namespace detail
+} // namespace folly
index 0f243d3..d085dcb 100644 (file)
@@ -29,9 +29,9 @@
 
 #include <folly/ScopeGuard.h>
 #include <folly/concurrency/CacheLocality.h>
-#include <folly/detail/AtomicUtils.h>
 #include <folly/detail/Futex.h>
 #include <folly/portability/Semaphore.h>
+#include <folly/synchronization/detail/AtomicUtils.h>
 
 namespace folly {
 namespace test {