in thread pools, take factory as shared ptr
[folly.git] / folly / SmallLocks.h
index 8bd1900b784ff7b2ff094d259e36a0bf3afdbca4..6d06cff335cd6ff7555ef3df5df7e4d081f92820 100644 (file)
 #include <mutex>
 
 #include <glog/logging.h>
+#include <folly/Portability.h>
 
-#ifndef __x86_64__
+#if !FOLLY_X64
 # error "SmallLocks.h is currently x64-only."
 #endif
 
-#include "folly/Portability.h"
-
 namespace folly {
 
 //////////////////////////////////////////////////////////////////////
@@ -97,7 +96,7 @@ namespace detail {
  * init(), since the free state is guaranteed to be all-bits zero.
  *
  * This class should be kept a POD, so we can used it in other packed
- * structs (gcc does not allow __attribute__((packed)) on structs that
+ * structs (gcc does not allow __attribute__((__packed__)) on structs that
  * contain non-POD data).  This means avoid adding a constructor, or
  * making some members private, etc.
  */
@@ -319,7 +318,7 @@ struct SpinLockArray {
 
   char padding_[FOLLY_CACHE_LINE_SIZE];
   std::array<PaddedSpinLock, N> data_;
-} __attribute__((aligned));
+} __attribute__((__aligned__));
 
 //////////////////////////////////////////////////////////////////////