Disable zerocopy if we're notified about deferred copies, add a isZeroCopyWriteInProg...
[folly.git] / folly / MicroSpinLock.h
index ee2c4420f62a33953d68d94885708ece6cddfe0b..b36998a7d4a56bc8210a25e30330be4e2953bbfa 100644 (file)
 
 #include <array>
 #include <atomic>
-#include <cinttypes>
-#include <cstdlib>
+#include <cassert>
+#include <cstdint>
 #include <mutex>
 #include <type_traits>
 
-#include <boost/noncopyable.hpp>
-#include <glog/logging.h>
-
 #include <folly/Portability.h>
 #include <folly/detail/Sleeper.h>
 
@@ -86,11 +83,11 @@ struct MicroSpinLock {
         sleeper.wait();
       }
     } while (!try_lock());
-    DCHECK(payload()->load() == LOCKED);
+    assert(payload()->load() == LOCKED);
   }
 
   void unlock() {
-    CHECK(payload()->load() == LOCKED);
+    assert(payload()->load() == LOCKED);
     payload()->store(FREE, std::memory_order_release);
   }
 
@@ -158,4 +155,4 @@ typedef std::lock_guard<MicroSpinLock> MSLGuard;
 
 //////////////////////////////////////////////////////////////////////
 
-}
+} // namespace folly