(wangle) express current Core functionality with a state machine
[folly.git] / folly / MPMCQueue.h
index 34ed779ac079dcf28cf41cb99736557e97e79347..d1e3b32d23f1e4ed72e6399d471f0986177f7916 100644 (file)
 #include <atomic>
 #include <assert.h>
 #include <boost/noncopyable.hpp>
-#include <errno.h>
 #include <limits>
-#include <linux/futex.h>
 #include <string.h>
-#include <sys/syscall.h>
 #include <type_traits>
 #include <unistd.h>
 
@@ -661,7 +658,7 @@ struct TurnSequencer {
 
       if (prevThresh == 0) {
         // bootstrap
-        spinCutoff = target;
+        spinCutoff.store(target);
       } else {
         // try once, keep moving if CAS fails.  Exponential moving average
         // with alpha of 7/8