Move CacheLocality out of detail/ and into concurrency/
[folly.git] / folly / ProducerConsumerQueue.h
index d0bf3ec8c3436976a9fe95927f815d7919cf051b..12f2bf427c33ce9485ac393d42097f6b1a1a1741 100644 (file)
@@ -27,7 +27,7 @@
 #include <type_traits>
 #include <utility>
 
-#include <folly/detail/CacheLocality.h>
+#include <folly/concurrency/CacheLocality.h>
 
 namespace folly {
 
@@ -168,14 +168,14 @@ struct ProducerConsumerQueue {
   }
 
 private:
 char pad0_[detail::CacheLocality::kFalseSharingRange];
 const uint32_t size_;
 T* const records_;
char pad0_[CacheLocality::kFalseSharingRange];
+ const uint32_t size_;
+ T* const records_;
 
 FOLLY_ALIGN_TO_AVOID_FALSE_SHARING std::atomic<unsigned int> readIndex_;
 FOLLY_ALIGN_TO_AVOID_FALSE_SHARING std::atomic<unsigned int> writeIndex_;
+ FOLLY_ALIGN_TO_AVOID_FALSE_SHARING std::atomic<unsigned int> readIndex_;
+ FOLLY_ALIGN_TO_AVOID_FALSE_SHARING std::atomic<unsigned int> writeIndex_;
 
 char pad1_[detail::CacheLocality::kFalseSharingRange - sizeof(writeIndex_)];
char pad1_[CacheLocality::kFalseSharingRange - sizeof(writeIndex_)];
 };
 
 }