Make folly::detail::CacheLocality portable on apple
[folly.git] / folly / detail / TurnSequencer.h
index 42bb7d01ffdc6d960e017e28e76d7466005c8d5f..c3dd4a43e0342f22c04d4f6af77c1f62d33a968d 100644 (file)
@@ -22,6 +22,7 @@
 #include <unistd.h>
 
 #include <folly/detail/Futex.h>
+#include <folly/Portability.h>
 
 namespace folly {
 
@@ -123,7 +124,7 @@ struct TurnSequencer {
       // the first effectSpinCutoff tries are spins, after that we will
       // record ourself as a waiter and block with futexWait
       if (tries < effectiveSpinCutoff) {
-        asm volatile ("pause");
+        asm_volatile_pause();
         continue;
       }