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

Unified Diff: third_party/WebKit/Source/wtf/ThreadingWin.cpp

Issue 2627153004: Use TLS storage for thread ids in wtf/ThreadingPThreads (Closed)
Patch Set: remove unnecessary include (trybots prev) Created 3 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/ThreadingPthreads.cpp ('k') | third_party/WebKit/Source/wtf/WTFThreadData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/ThreadingWin.cpp
diff --git a/third_party/WebKit/Source/wtf/ThreadingWin.cpp b/third_party/WebKit/Source/wtf/ThreadingWin.cpp
index d2f9ff5c7190acc01f8d2c0ee72a6eba939f9347..f8d87f820ca48c1ab946eba4cf8ed911404f72de 100644
--- a/third_party/WebKit/Source/wtf/ThreadingWin.cpp
+++ b/third_party/WebKit/Source/wtf/ThreadingWin.cpp
@@ -127,6 +127,14 @@ typedef struct tagTHREADNAME_INFO {
static Mutex* atomicallyInitializedStaticMutex;
+namespace internal {
+
+ThreadIdentifier currentThreadSyscall() {
+ return static_cast<ThreadIdentifier>(GetCurrentThreadId());
+}
+
+} // namespace internal
+
void lockAtomicallyInitializedStaticMutex() {
DCHECK(atomicallyInitializedStaticMutex);
atomicallyInitializedStaticMutex->lock();
@@ -153,7 +161,7 @@ void initializeThreading() {
}
ThreadIdentifier currentThread() {
- return static_cast<ThreadIdentifier>(GetCurrentThreadId());
+ return internal::currentThreadSyscall();
}
MutexBase::MutexBase(bool recursive) {
« no previous file with comments | « third_party/WebKit/Source/wtf/ThreadingPthreads.cpp ('k') | third_party/WebKit/Source/wtf/WTFThreadData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698