Commit f9d70dcd authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

Revert D5714883: [Folly] Shrink MicroSpinLock.h transitive includes and inline methods

Summary:
This reverts commit 1744685ff9fa8d3620aef2545c8fe3ebc481df06

bypass-lint

Differential Revision: D5714883

fbshipit-source-id: 0cdb5f2cac095a9202cb1310ff8e75e75b4afd74
parent 2ccbaf9e
...@@ -39,18 +39,17 @@ ...@@ -39,18 +39,17 @@
#include <array> #include <array>
#include <atomic> #include <atomic>
#include <cassert> #include <cinttypes>
#include <cstdint> #include <cstdlib>
#include <mutex>
#include <type_traits> #include <type_traits>
#include <boost/noncopyable.hpp>
#include <glog/logging.h>
#include <folly/Portability.h> #include <folly/Portability.h>
#include <folly/detail/Sleeper.h> #include <folly/detail/Sleeper.h>
FOLLY_NAMESPACE_STD_BEGIN
template <class Mutex>
class lock_guard;
FOLLY_NAMESPACE_STD_END
namespace folly { namespace folly {
/* /*
...@@ -87,11 +86,11 @@ struct MicroSpinLock { ...@@ -87,11 +86,11 @@ struct MicroSpinLock {
sleeper.wait(); sleeper.wait();
} }
} while (!try_lock()); } while (!try_lock());
assert(payload()->load() == LOCKED); DCHECK(payload()->load() == LOCKED);
} }
void unlock() { void unlock() {
assert(payload()->load() == LOCKED); CHECK(payload()->load() == LOCKED);
payload()->store(FREE, std::memory_order_release); payload()->store(FREE, std::memory_order_release);
} }
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* @author Jordan DeLong <delong.j@fb.com> * @author Jordan DeLong <delong.j@fb.com>
*/ */
#include <cstdint> #include <cinttypes>
#include <folly/portability/Asm.h> #include <folly/portability/Asm.h>
#include <folly/portability/Time.h> #include <folly/portability/Time.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment