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

Unified Diff: base/threading/thread_local_storage.h

Issue 2948003003: Inline PlatformThreadLocalStorage::GetTLSValue (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | base/threading/thread_local_storage_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/thread_local_storage.h
diff --git a/base/threading/thread_local_storage.h b/base/threading/thread_local_storage.h
index fd2a789d0152b0ab9cb46f1a1e7353a0c931f949..d6b66e8574c2e915c23bede193d89e44b2a6ec9f 100644
--- a/base/threading/thread_local_storage.h
+++ b/base/threading/thread_local_storage.h
@@ -56,7 +56,13 @@ class BASE_EXPORT PlatformThreadLocalStorage {
// SetTLSValue().
static void FreeTLS(TLSKey key);
static void SetTLSValue(TLSKey key, void* value);
- static void* GetTLSValue(TLSKey key);
+ static void* GetTLSValue(TLSKey key) {
+#if defined(OS_WIN)
+ return TlsGetValue(key);
+#elif defined(OS_POSIX)
+ return pthread_getspecific(key);
+#endif
+ }
// Each platform (OS implementation) is required to call this method on each
// terminating thread when the thread is about to terminate. This method
« no previous file with comments | « no previous file | base/threading/thread_local_storage_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698