Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: third_party/WebKit/Source/wtf/SpinLock.h

Issue 1611343002: wtf reformat test Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pydent Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/wtf/SizeLimits.cpp ('k') | third_party/WebKit/Source/wtf/SpinLock.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/SpinLock.h
diff --git a/third_party/WebKit/Source/wtf/SpinLock.h b/third_party/WebKit/Source/wtf/SpinLock.h
index 7c525cf007aee93c827597e809007013049fc6d6..a747d77fccda7384e676bcaffad8f65a24cfaa09 100644
--- a/third_party/WebKit/Source/wtf/SpinLock.h
+++ b/third_party/WebKit/Source/wtf/SpinLock.h
@@ -46,33 +46,31 @@
namespace WTF {
class SpinLock {
-public:
- using Guard = std::lock_guard<SpinLock>;
+ public:
+ using Guard = std::lock_guard<SpinLock>;
- ALWAYS_INLINE void lock()
- {
- static_assert(sizeof(m_lock) == sizeof(int), "int and m_lock are different sizes");
- if (LIKELY(!m_lock.exchange(true, std::memory_order_acq_rel)))
- return;
- lockSlow();
- }
+ ALWAYS_INLINE void lock() {
+ static_assert(sizeof(m_lock) == sizeof(int),
+ "int and m_lock are different sizes");
+ if (LIKELY(!m_lock.exchange(true, std::memory_order_acq_rel)))
+ return;
+ lockSlow();
+ }
- ALWAYS_INLINE void unlock()
- {
- m_lock.store(false, std::memory_order_release);
- }
+ ALWAYS_INLINE void unlock() {
+ m_lock.store(false, std::memory_order_release);
+ }
-private:
- // This is called if the initial attempt to acquire the lock fails. It's
- // slower, but has a much better scheduling and power consumption behavior.
- WTF_EXPORT void lockSlow();
+ private:
+ // This is called if the initial attempt to acquire the lock fails. It's
+ // slower, but has a much better scheduling and power consumption behavior.
+ WTF_EXPORT void lockSlow();
- std::atomic_int m_lock;
+ std::atomic_int m_lock;
};
-
-} // namespace WTF
+} // namespace WTF
using WTF::SpinLock;
-#endif // WTF_SpinLock_h
+#endif // WTF_SpinLock_h
« no previous file with comments | « third_party/WebKit/Source/wtf/SizeLimits.cpp ('k') | third_party/WebKit/Source/wtf/SpinLock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698