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(); |