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

Unified Diff: third_party/WebKit/Source/wtf/Threading.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
Index: third_party/WebKit/Source/wtf/Threading.h
diff --git a/third_party/WebKit/Source/wtf/Threading.h b/third_party/WebKit/Source/wtf/Threading.h
index f8555f2fa63ba67fa37a00022a87e89287313af2..1aea49fa7e92c0e4618540038bb7ac7ad120c7e8 100644
--- a/third_party/WebKit/Source/wtf/Threading.h
+++ b/third_party/WebKit/Source/wtf/Threading.h
@@ -39,18 +39,18 @@
// by some toolchains. Make use of double-checked locking to reduce overhead.
// Note that this uses system-wide default lock, and cannot be used before
// WTF::initializeThreading() is called.
-#define DEFINE_THREAD_SAFE_STATIC_LOCAL(T, name, initializer) \
- /* Init to nullptr is thread-safe on all implementations. */ \
- static void* name##Pointer = nullptr; \
- if (!WTF::acquireLoad(&name##Pointer)) { \
- WTF::lockAtomicallyInitializedStaticMutex(); \
- if (!WTF::acquireLoad(&name##Pointer)) { \
- std::remove_const<T>::type* initializerResult = initializer; \
- WTF::releaseStore(&name##Pointer, initializerResult); \
- } \
- WTF::unlockAtomicallyInitializedStaticMutex(); \
- } \
- T& name = *static_cast<T*>(name##Pointer)
+#define DEFINE_THREAD_SAFE_STATIC_LOCAL(T, name, initializer) \
+ /* Init to nullptr is thread-safe on all implementations. */ \
+ static void* name##Pointer = nullptr; \
+ if (!WTF::acquireLoad(&name##Pointer)) { \
+ WTF::lockAtomicallyInitializedStaticMutex(); \
+ if (!WTF::acquireLoad(&name##Pointer)) { \
+ std::remove_const<T>::type* initializerResult = initializer; \
+ WTF::releaseStore(&name##Pointer, initializerResult); \
+ } \
+ WTF::unlockAtomicallyInitializedStaticMutex(); \
+ } \
+ T& name = *static_cast<T*>(name##Pointer)
namespace WTF {
@@ -71,9 +71,9 @@ WTF_EXPORT bool isBeforeThreadCreated();
WTF_EXPORT void willCreateThread();
#endif
-} // namespace WTF
+} // namespace WTF
using WTF::ThreadIdentifier;
using WTF::currentThread;
-#endif // Threading_h
+#endif // Threading_h
« no previous file with comments | « third_party/WebKit/Source/wtf/ThreadSpecificWin.cpp ('k') | third_party/WebKit/Source/wtf/ThreadingPrimitives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698