logging: rename the `DEBUG` log level to `DBG`
[folly.git] / folly / MicroSpinLock.h
index b36998a7d4a56bc8210a25e30330be4e2953bbfa..8996f8c328e1016922a2881ffa6cf98efd5c2fcc 100644 (file)
@@ -45,7 +45,8 @@
 #include <type_traits>
 
 #include <folly/Portability.h>
-#include <folly/detail/Sleeper.h>
+#include <folly/lang/Align.h>
+#include <folly/synchronization/detail/Sleeper.h>
 
 namespace folly {
 
@@ -118,7 +119,7 @@ static_assert(
 #define FOLLY_CACHE_LINE_SIZE 64
 
 template <class T, size_t N>
-struct FOLLY_ALIGNED_MAX SpinLockArray {
+struct alignas(max_align_v) SpinLockArray {
   T& operator[](size_t i) {
     return data_[i].lock;
   }
@@ -140,9 +141,8 @@ struct FOLLY_ALIGNED_MAX SpinLockArray {
 
   // Check if T can theoretically cross a cache line.
   static_assert(
-      folly::max_align_v > 0 &&
-          FOLLY_CACHE_LINE_SIZE % folly::max_align_v == 0 &&
-          sizeof(T) <= folly::max_align_v,
+      max_align_v > 0 && FOLLY_CACHE_LINE_SIZE % max_align_v == 0 &&
+          sizeof(T) <= max_align_v,
       "T can cross cache line boundaries");
 
   char padding_[FOLLY_CACHE_LINE_SIZE];