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

Unified Diff: runtime/platform/thread_win.h

Issue 9328042: Move the thread local functions to the Thread class in runtime/platform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from asiva@ Created 8 years, 10 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 | « runtime/platform/thread_macos.cc ('k') | runtime/platform/thread_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/thread_win.h
diff --git a/runtime/platform/thread_win.h b/runtime/platform/thread_win.h
index daa75e4d8cc602f2d0c28a3bd800a12adb4b3f15..52551832803eb1ee3a9947cefb830d0abfed19be 100644
--- a/runtime/platform/thread_win.h
+++ b/runtime/platform/thread_win.h
@@ -13,6 +13,26 @@
namespace dart {
+typedef DWORD ThreadLocalKey;
+
+class ThreadInlineImpl {
+ private:
+ ThreadInlineImpl() {}
+ ~ThreadInlineImpl() {}
+
+ static uword GetThreadLocal(ThreadLocalKey key) {
+ static ThreadLocalKey kUnsetThreadLocalKey = TLS_OUT_OF_INDEXES;
+ ASSERT(key != kUnsetThreadLocalKey);
+ return reinterpret_cast<uword>(TlsGetValue(key));
+ }
+
+ friend class Thread;
+
+ DISALLOW_ALLOCATION();
+ DISALLOW_COPY_AND_ASSIGN(ThreadInlineImpl);
+};
+
+
class MutexData {
private:
MutexData() {}
« no previous file with comments | « runtime/platform/thread_macos.cc ('k') | runtime/platform/thread_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698