Revert D5714883: [Folly] Shrink MicroSpinLock.h transitive includes and inline methods
authorChristopher Dykes <cdykes@fb.com>
Tue, 29 Aug 2017 01:06:22 +0000 (18:06 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 29 Aug 2017 01:08:42 +0000 (18:08 -0700)
Summary:
This reverts commit 1744685ff9fa8d3620aef2545c8fe3ebc481df06

bypass-lint

Differential Revision: D5714883

fbshipit-source-id: 0cdb5f2cac095a9202cb1310ff8e75e75b4afd74

folly/MicroSpinLock.h
folly/detail/Sleeper.h

index 7acf216f70b5a5468ba3d991f33236d5cce2f2cb..ee2c4420f62a33953d68d94885708ece6cddfe0b 100644 (file)
 
 #include <array>
 #include <atomic>
-#include <cassert>
-#include <cstdint>
+#include <cinttypes>
+#include <cstdlib>
+#include <mutex>
 #include <type_traits>
 
+#include <boost/noncopyable.hpp>
+#include <glog/logging.h>
+
 #include <folly/Portability.h>
 #include <folly/detail/Sleeper.h>
 
-FOLLY_NAMESPACE_STD_BEGIN
-template <class Mutex>
-class lock_guard;
-FOLLY_NAMESPACE_STD_END
-
 namespace folly {
 
 /*
@@ -87,11 +86,11 @@ struct MicroSpinLock {
         sleeper.wait();
       }
     } while (!try_lock());
-    assert(payload()->load() == LOCKED);
+    DCHECK(payload()->load() == LOCKED);
   }
 
   void unlock() {
-    assert(payload()->load() == LOCKED);
+    CHECK(payload()->load() == LOCKED);
     payload()->store(FREE, std::memory_order_release);
   }
 
index 2d1f24874b27ef33e1fd6171226a48b8e8dfba15..c2efad002098bbf1e018edd5f83e1f094a538af7 100644 (file)
@@ -21,7 +21,7 @@
  * @author Jordan DeLong <delong.j@fb.com>
  */
 
-#include <cstdint>
+#include <cinttypes>
 
 #include <folly/portability/Asm.h>
 #include <folly/portability/Time.h>