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

Unified Diff: base/threading/thread_local_storage.h

Issue 2692273008: Hacky slashy (Closed)
Patch Set: wip Created 3 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
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..d8e8c1b96da4c700074a3ffcba6b297c291762a1 100644
--- a/base/threading/thread_local_storage.h
+++ b/base/threading/thread_local_storage.h
@@ -16,6 +16,8 @@
#include <windows.h>
#elif defined(OS_POSIX)
#include <pthread.h>
+#elif defined(OS_FUCHSIA)
+#include <threads.h>
#endif
namespace base {
@@ -41,6 +43,13 @@ class BASE_EXPORT PlatformThreadLocalStorage {
// such a key, but if it is returned (i.e., the OS tries to allocate it) we
// will just request another key.
enum { TLS_KEY_OUT_OF_INDEXES = 0x7FFFFFFF };
+#elif defined(OS_FUCHSIA)
+ typedef tss_t TLSKey;
+ // The following is a "reserved key" which is used in our generic Chromium
+ // ThreadLocalStorage implementation. We expect that an OS will not return
+ // such a key, but if it is returned (i.e., the OS tries to allocate it) we
+ // will just request another key.
+ enum { TLS_KEY_OUT_OF_INDEXES = 0x7FFFFFFF };
#endif
// The following methods need to be supported on each OS platform, so that

Powered by Google App Engine
This is Rietveld 408576698