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

Unified Diff: runtime/platform/thread.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 | « no previous file | runtime/platform/thread_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/thread.h
diff --git a/runtime/platform/thread.h b/runtime/platform/thread.h
index 603949e9ca7f3570dd03d2d98eb74659a2184584..e4c3214cf7ba2d818e2c4260845eef226a3fd983 100644
--- a/runtime/platform/thread.h
+++ b/runtime/platform/thread.h
@@ -22,12 +22,21 @@ namespace dart {
class Thread {
public:
+ static ThreadLocalKey kUnsetThreadLocalKey;
+
typedef void (*ThreadStartFunction) (uword parameter);
// Start a thread running the specified function. Returns 0 if the
// thread started successfuly and a system specific error code if
// the thread failed to start.
static int Start(ThreadStartFunction function, uword parameters);
+
+ static ThreadLocalKey CreateThreadLocal();
+ static void DeleteThreadLocal(ThreadLocalKey key);
+ static uword GetThreadLocal(ThreadLocalKey key) {
+ return ThreadInlineImpl::GetThreadLocal(key);
+ }
+ static void SetThreadLocal(ThreadLocalKey key, uword value);
};
« no previous file with comments | « no previous file | runtime/platform/thread_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698