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

Unified Diff: src/platform.h

Issue 6696112: Fast TLS support.
Patch Set: Created 9 years, 9 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: src/platform.h
diff --git a/src/platform.h b/src/platform.h
index 43291cf48257c0fddf6e65779d6594e3bd075b2f..4f34abe43ad56b34ce597f644aac126f3f85b52c 100644
--- a/src/platform.h
+++ b/src/platform.h
@@ -114,6 +114,7 @@ int signbit(double x);
#endif // __GNUC__
#include "atomicops.h"
+#include "platform-tls.h"
#include "utils.h"
#include "v8globals.h"
@@ -428,6 +429,19 @@ class Thread: public ThreadHandle {
return GetThreadLocal(key) != NULL;
}
+#ifdef V8_FAST_TLS_SUPPORTED
+ static inline void* GetExistingThreadLocal(LocalStorageKey key) {
antonm 2011/03/25 16:44:44 maybe make this method a template by a return type
Vitaly Repeshko 2011/03/27 15:54:48 I'd like to avoid significant interface changes in
+ void* result = reinterpret_cast<void*>(
+ InternalGetExistingThreadLocal(static_cast<intptr_t>(key)));
+ ASSERT(result == GetThreadLocal(key));
+ return result;
+ }
+#else
+ static inline void* GetExistingThreadLocal(LocalStorageKey key) {
+ return GetThreadLocal(key);
+ }
+#endif
+
// A hint to the scheduler to let another thread run.
static void YieldCPU();

Powered by Google App Engine
This is Rietveld 408576698